1.\" 2.\" Copyright (C) 2008 Attilio Rao <attilio@FreeBSD.org> 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice(s), this list of conditions and the following disclaimer as 10.\" the first lines of this file unmodified other than the possible 11.\" addition of one or more copyright notices. 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice(s), this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 16.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY 17.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19.\" DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 20.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 26.\" DAMAGE. 27.\" 28.Dd January 22, 2008 29.Dt BUF_ISLOCKED 9 30.Os 31.Sh NAME 32.Nm BUF_ISLOCKED 33.Nd "returns the state of the lock linked to the buffer" 34.Sh SYNOPSIS 35.In sys/param.h 36.In sys/systm.h 37.In sys/uio.h 38.In sys/bio.h 39.In sys/buf.h 40.Ft int 41.Fn BUF_ISLOCKED "struct buf *bp" 42.Sh DESCRIPTION 43The 44.Fn BUF_ISLOCKED 45function returns the status of the lock linked to the buffer in relation to 46curthread. 47.Pp 48It can return: 49.Bl -tag -width ".Dv LK_EXCLUSIVE" 50.It Dv LK_EXCLUSIVE 51An exclusive lock is held by curthread. 52.It Dv LK_EXCLOTHER 53An exclusive lock is held by someone other than curthread. 54.It Dv LK_SHARED 55A shared lock is held. 56.It Li 0 57The lock is not held by anyone. 58.El 59.Sh SEE ALSO 60.Xr buf 9 , 61.Xr BUF_LOCK 9 , 62.Xr BUF_UNLOCK 9 , 63.Xr lockmgr 9 , 64.Xr lockstatus 9 65.Sh AUTHORS 66This manual page was written by 67.An Attilio Rao Aq Mt attilio@FreeBSD.org . 68