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.Dd January 22, 2008 297ad783ffSAttilio Rao.Dt BUF_ISLOCKED 9 307ad783ffSAttilio Rao.Os 317ad783ffSAttilio Rao.Sh NAME 327ad783ffSAttilio Rao.Nm BUF_ISLOCKED 337ad783ffSAttilio Rao.Nd "returns the state of the lock linked to the buffer" 347ad783ffSAttilio Rao.Sh SYNOPSIS 357ad783ffSAttilio Rao.In sys/param.h 367ad783ffSAttilio Rao.In sys/systm.h 377ad783ffSAttilio Rao.In sys/uio.h 387ad783ffSAttilio Rao.In sys/bio.h 397ad783ffSAttilio Rao.In sys/buf.h 407ad783ffSAttilio Rao.Ft int 417ad783ffSAttilio Rao.Fn BUF_ISLOCKED "struct buf *bp" 427ad783ffSAttilio Rao.Sh DESCRIPTION 437ad783ffSAttilio RaoThe 447ad783ffSAttilio Rao.Fn BUF_ISLOCKED 457ad783ffSAttilio Raofunction returns the status of the lock linked to the buffer in relation to 467ad783ffSAttilio Raocurthread. 477ad783ffSAttilio Rao.Pp 487ad783ffSAttilio RaoIt can return: 497ad783ffSAttilio Rao.Bl -tag -width ".Dv LK_EXCLUSIVE" 507ad783ffSAttilio Rao.It Dv LK_EXCLUSIVE 517ad783ffSAttilio RaoAn exclusive lock is held by curthread. 527ad783ffSAttilio Rao.It Dv LK_EXCLOTHER 5373bbeaa5SGlen BarberAn exclusive lock is held by someone other than curthread. 547ad783ffSAttilio Rao.It Dv LK_SHARED 557ad783ffSAttilio RaoA shared lock is held. 567ad783ffSAttilio Rao.It Li 0 577ad783ffSAttilio RaoThe lock is not held by anyone. 580a431e07SXin LI.El 597ad783ffSAttilio Rao.Sh SEE ALSO 607ad783ffSAttilio Rao.Xr buf 9 , 617ad783ffSAttilio Rao.Xr BUF_LOCK 9 , 627ad783ffSAttilio Rao.Xr BUF_UNLOCK 9 , 63*1e9469d1SChristian Brueffer.Xr lockmgr 9 , 64*1e9469d1SChristian Brueffer.Xr lockstatus 9 657ad783ffSAttilio Rao.Sh AUTHORS 667ad783ffSAttilio RaoThis manual page was written by 678a7314fcSBaptiste Daroussin.An Attilio Rao Aq Mt attilio@FreeBSD.org . 68