BUF_TIMELOCK.9 (571dba6ec9f25ecf7582dc2192daf1ceea70065f) | BUF_TIMELOCK.9 (82ed18ac0ce448f0cab4f87b0dea74fc3f9f9469) |
---|---|
1.\" 2.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice(s), this list of conditions and the following disclaimer as --- 13 unchanged lines hidden (view full) --- 22.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 25.\" DAMAGE. 26.\" 27.\" $FreeBSD$ 28.\" 29.Dd July 9, 2001 | 1.\" 2.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice(s), this list of conditions and the following disclaimer as --- 13 unchanged lines hidden (view full) --- 22.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 25.\" DAMAGE. 26.\" 27.\" $FreeBSD$ 28.\" 29.Dd July 9, 2001 |
30.Dt BUF_TIMELOCK 9 | 30.Dt BUF_LOCK 9 |
31.Os 32.Sh NAME | 31.Os 32.Sh NAME |
33.Nm BUF_TIMELOCK 34.Nd "locks a buffer" | 33.Nm BUF_LOCK 34.Nd "Locks a buffer" |
35.Sh SYNOPSIS | 35.Sh SYNOPSIS |
36.In sys/param.h 37.In sys/systm.h 38.In sys/uio.h 39.In sys/bio.h 40.In sys/buf.h | 36.Fd #include <sys/buf.h> |
41.Ft int | 37.Ft int |
42.Fn BUF_TIMELOCK "struct buf *bp" "int locktype" "char *wmesg" "int catch" "int timo" | 38.Fo BUF_LOCK 39.Fa "struct buf *bp" 40.Fa "int locktype" 41.Fa "char *wmesg" 42.Fa "int catch" 43.Fa "int timo" 44.Fc |
43.Sh DESCRIPTION 44The | 45.Sh DESCRIPTION 46The |
45.Fn BUF_TIMELOCK | 47.Nm |
46function locks the given buffer, and limits the amount of time it 47will sleep to | 48function locks the given buffer, and limits the amount of time it 49will sleep to |
48.Fa timo | 50.Ar timo |
49and OR's | 51and OR's |
50.Fa catch 51into the sleep's priority. 52.Fa wmesg | 52.Ar catch 53into the sleep priority. 54.Ar wmesg |
53is the wmesg used in the sleep. 54.Pp 55Its arguments are: | 55is the wmesg used in the sleep. 56.Pp 57Its arguments are: |
56.Bl -tag -width ".Fa locktype" 57.It Fa bp | 58.Bl -tag -width locktype 59.It Ar bp |
58The buffer to lock. | 60The buffer to lock. |
59.It Fa locktype 60Flags controlling the type of lock. 61See 62.Xr lockmgr 9 63for details. 64.It Fa wmesg 65The wmesg used in any sleeps while acquiring the lock. 66.It Fa catch 67Priority OR'd into the sleep's priority. 68.It Fa timo | 61.It Ar locktype 62Flags controlling the type of lock. See lockmgr(9) for details. 63.It Ar wmesg 64The wmesg used in any sleeps while aquiring the lock. 65.It Ar catch 66Priority OR'd into the sleep priority. 67.It Ar timo |
69The timeout for any sleeps encountered during the lock. 70.El | 68The timeout for any sleeps encountered during the lock. 69.El |
71.Sh RETURN VALUES 72A value of 0 is returned on success. 73See 74.Xr lockmgr 9 75for details on non-zero return values. | 70.Sh RETURN VALUE 71A value of 0 is returned on success. See lockmgr(9) for 72details on non-zero return values. |
76.Sh SEE ALSO | 73.Sh SEE ALSO |
77.Xr buf 9 , 78.Xr BUF_LOCK 9 , 79.Xr BUF_UNLOCK 9 , | 74.Xr buf 9 |
80.Xr lockmgr 9 | 75.Xr lockmgr 9 |
76.Xr BUF_UNLOCK 9 77.Xr BUF_TIMELOCK 9 |
|
81.Sh AUTHORS | 78.Sh AUTHORS |
82This manual page was written by 83.An Chad David Aq davidc@acns.ab.ca . | 79This man page was written by Chad David. |