17ad783ffSAttilio Rao.\" 27ad783ffSAttilio Rao.\" Copyright (C) 2008 Attilio Rao <attilio@FreeBSD.org> 37ad783ffSAttilio Rao.\" All rights reserved. 47ad783ffSAttilio Rao.\" 57ad783ffSAttilio Rao.\" Redistribution and use in source and binary forms, with or without 67ad783ffSAttilio Rao.\" modification, are permitted provided that the following conditions 77ad783ffSAttilio Rao.\" are met: 87ad783ffSAttilio Rao.\" 1. Redistributions of source code must retain the above copyright 97ad783ffSAttilio Rao.\" notice(s), this list of conditions and the following disclaimer as 107ad783ffSAttilio Rao.\" the first lines of this file unmodified other than the possible 117ad783ffSAttilio Rao.\" addition of one or more copyright notices. 127ad783ffSAttilio Rao.\" 2. Redistributions in binary form must reproduce the above copyright 137ad783ffSAttilio Rao.\" notice(s), this list of conditions and the following disclaimer in the 147ad783ffSAttilio Rao.\" documentation and/or other materials provided with the distribution. 157ad783ffSAttilio Rao.\" 167ad783ffSAttilio Rao.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY 177ad783ffSAttilio Rao.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 187ad783ffSAttilio Rao.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 197ad783ffSAttilio Rao.\" DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY 207ad783ffSAttilio Rao.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 217ad783ffSAttilio Rao.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 227ad783ffSAttilio Rao.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 237ad783ffSAttilio Rao.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 247ad783ffSAttilio Rao.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 257ad783ffSAttilio Rao.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 267ad783ffSAttilio Rao.\" DAMAGE. 277ad783ffSAttilio Rao.\" 287ad783ffSAttilio Rao.\" $FreeBSD$ 297ad783ffSAttilio Rao.\" 307ad783ffSAttilio Rao.Dd January 22, 2008 317ad783ffSAttilio Rao.Dt BUF_ISLOCKED 9 327ad783ffSAttilio Rao.Os 337ad783ffSAttilio Rao.Sh NAME 347ad783ffSAttilio Rao.Nm BUF_ISLOCKED 357ad783ffSAttilio Rao.Nd "returns the state of the lock linked to the buffer" 367ad783ffSAttilio Rao.Sh SYNOPSIS 377ad783ffSAttilio Rao.In sys/param.h 387ad783ffSAttilio Rao.In sys/systm.h 397ad783ffSAttilio Rao.In sys/uio.h 407ad783ffSAttilio Rao.In sys/bio.h 417ad783ffSAttilio Rao.In sys/buf.h 427ad783ffSAttilio Rao.Ft int 437ad783ffSAttilio Rao.Fn BUF_ISLOCKED "struct buf *bp" 447ad783ffSAttilio Rao.Sh DESCRIPTION 457ad783ffSAttilio RaoThe 467ad783ffSAttilio Rao.Fn BUF_ISLOCKED 477ad783ffSAttilio Raofunction returns the status of the lock linked to the buffer in relation to 487ad783ffSAttilio Raocurthread. 497ad783ffSAttilio Rao.Pp 507ad783ffSAttilio RaoIt can return: 517ad783ffSAttilio Rao.Bl -tag -width ".Dv LK_EXCLUSIVE" 527ad783ffSAttilio Rao.It Dv LK_EXCLUSIVE 537ad783ffSAttilio RaoAn exclusive lock is held by curthread. 547ad783ffSAttilio Rao.It Dv LK_EXCLOTHER 5573bbeaa5SGlen BarberAn exclusive lock is held by someone other than curthread. 567ad783ffSAttilio Rao.It Dv LK_SHARED 577ad783ffSAttilio RaoA shared lock is held. 587ad783ffSAttilio Rao.It Li 0 597ad783ffSAttilio RaoThe lock is not held by anyone. 600a431e07SXin LI.El 617ad783ffSAttilio Rao.Sh SEE ALSO 627ad783ffSAttilio Rao.Xr buf 9 , 637ad783ffSAttilio Rao.Xr BUF_LOCK 9 , 647ad783ffSAttilio Rao.Xr BUF_UNLOCK 9 , 65*1e9469d1SChristian Brueffer.Xr lockmgr 9 , 66*1e9469d1SChristian Brueffer.Xr lockstatus 9 677ad783ffSAttilio Rao.Sh AUTHORS 687ad783ffSAttilio RaoThis manual page was written by 698a7314fcSBaptiste Daroussin.An Attilio Rao Aq Mt attilio@FreeBSD.org . 70