blob: 6876648ad8634301f10a654788703c371c436191 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
<table class="head">
<tr>
<td class="head-ltitle">BUF_LOCK(9)</td>
<td class="head-vol">Kernel Developer's Manual</td>
<td class="head-rtitle">BUF_LOCK(9)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">BUF_LOCK</code> — <span class="Nd">locks a
buffer</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="In">#include
<<a class="In">sys/param.h</a>></code>
<br/>
<code class="In">#include <<a class="In">sys/systm.h</a>></code>
<br/>
<code class="In">#include <<a class="In">sys/uio.h</a>></code>
<br/>
<code class="In">#include <<a class="In">sys/bio.h</a>></code>
<br/>
<code class="In">#include <<a class="In">sys/buf.h</a>></code></p>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">BUF_LOCK</code>(<var class="Fa" style="white-space: nowrap;">struct
buf *bp</var>, <var class="Fa" style="white-space: nowrap;">int
locktype</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The
<a class="permalink" href="#BUF_LOCK"><code class="Fn" id="BUF_LOCK">BUF_LOCK</code></a>()
function locks the given buffer. If the lock is already held this call will
block until it can acquire the lock unless <code class="Dv">LK_NOWAIT</code>
is set.</p>
<p class="Pp">Its arguments are:</p>
<dl class="Bl-tag">
<dt><var class="Fa">bp</var></dt>
<dd>The buffer to lock.</dd>
<dt><var class="Fa">locktype</var></dt>
<dd>Flags controlling the type of lock. See <a class="Xr">lockmgr(9)</a> for
details.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
<p class="Pp">A value of 0 is returned upon success. See
<a class="Xr">lockmgr(9)</a> for information on non-zero return values.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<p class="Pp"><a class="Xr">buf(9)</a>, <a class="Xr">BUF_TIMELOCK(9)</a>,
<a class="Xr">BUF_UNLOCK(9)</a>, <a class="Xr">lockmgr(9)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<p class="Pp">This manual page was written by <span class="An">Chad David</span>
<<a class="Mt" href="mailto:davidc@acns.ab.ca">davidc@acns.ab.ca</a>>.</p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">July 9, 2001</td>
<td class="foot-os">FreeBSD 15.0</td>
</tr>
</table>
|