'\" t .\" Title: fence_init .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Device drivers infrastructure .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "FENCE_INIT" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Device drivers infrastructure" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" fence_init \- Initialize a custom fence\&. .SH "SYNOPSIS" .HP \w'void\ fence_init('u .BI "void fence_init(struct\ fence\ *\ " "fence" ", const\ struct\ fence_ops\ *\ " "ops" ", spinlock_t\ *\ " "lock" ", u64\ " "context" ", unsigned\ " "seqno" ");" .SH "ARGUMENTS" .PP \fIfence\fR .RS 4 [in] the fence to initialize .RE .PP \fIops\fR .RS 4 [in] the fence_ops for operations on this fence .RE .PP \fIlock\fR .RS 4 [in] the irqsafe spinlock to use for locking this fence .RE .PP \fIcontext\fR .RS 4 [in] the execution context this fence is run on .RE .PP \fIseqno\fR .RS 4 [in] a linear increasing sequence number for this context .RE .SH "DESCRIPTION" .PP Initializes an allocated fence, the caller doesn\*(Aqt have to keep its refcount after committing with this fence, but it will need to hold a refcount again if fence_ops\&.enable_signaling gets called\&. This can be used for other implementing other types of fence\&. .PP context and seqno are used for easy comparison between fences, allowing to check which fence is later by simply using fence_later\&. .SH "COPYRIGHT" .br