From dd86bdf4db386e4a7a20a57c353a2d3a15adf147 Mon Sep 17 00:00:00 2001 From: Hiten Pandya Date: Wed, 22 Dec 2004 07:12:24 +0000 Subject: [PATCH] Document lockcountnb(9) which is the non-blocking counterpart of lockcount(9). Add it to the MLINKs as well. Correct header name, it is sys/lock.h and not sys/lockmgr.h. --- share/man/man9/Makefile | 3 ++- share/man/man9/lock.9 | 13 +++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 4a04160d2d..5c890c3155 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/share/man/man9/Makefile,v 1.60.2.26 2003/06/13 01:04:17 hmp Exp $ -# $DragonFly: src/share/man/man9/Makefile,v 1.14 2004/09/20 20:38:17 eirikn Exp $ +# $DragonFly: src/share/man/man9/Makefile,v 1.15 2004/12/22 07:12:24 hmp Exp $ MAN= DECLARE_MODULE.9 DELAY.9 DEV_MODULE.9 KASSERT.9 MD5.9 \ MODULE_DEPEND.9 MODULE_VERSION.9 SPLASSERT.9 SYSCALL_MODULE.9 \ @@ -211,6 +211,7 @@ MLINKS+=BUS_READ_IVAR.9 BUS_WRITE_IVAR.9 MLINKS+=bus_generic_read_ivar.9 bus_generic_write_ivar.9 MLINKS+=lock.9 lockcount.9 +MLINKS+=lock.9 lockcountnb.9 MLINKS+=lock.9 lockinit.9 MLINKS+=lock.9 lockmgr.9 MLINKS+=lock.9 lockmgr_printinfo.9 diff --git a/share/man/man9/lock.9 b/share/man/man9/lock.9 index 85659e1041..531c8977cb 100644 --- a/share/man/man9/lock.9 +++ b/share/man/man9/lock.9 @@ -25,7 +25,7 @@ .\" DAMAGE. .\" .\" $FreeBSD: src/share/man/man9/lock.9,v 1.11 2003/09/08 19:57:21 ru Exp $ -.\" $DragonFly: src/share/man/man9/lock.9,v 1.2 2004/05/10 13:06:53 hmp Exp $ +.\" $DragonFly: src/share/man/man9/lock.9,v 1.3 2004/12/22 07:12:24 hmp Exp $ .\" .Dd July 9, 2001 .Dt LOCK 9 @@ -45,6 +45,8 @@ .Ft int .Fn lockcount "struct lock *lkp" .Ft int +.Fn lockcountnb "struct lock *lkp" +.Ft int .Fn lockmgr "struct lock *lkp" "u_int flags" "lwkt_tokref_t interlkp" "struct thread *td" .Ft int .Fn lockstatus "struct lock *lkp" "struct thread *td" @@ -96,6 +98,13 @@ held against the lock .Fa lkp . .Pp The +.Fn lockcountnb +function is a non-blocking counter-part of +.Fn lockcount . +which, can be safely used in assertion statements e.g. a +.Xr KASSERT 9 . +.Pp +The .Fn lockmgr function handles general locking functionality within the kernel, including support for shared and exclusive locks, and recursion. @@ -145,7 +154,7 @@ This is used before freeing a lock that is part of a piece of memory that is about to be freed. .Po As documented in -.Pa sys/lockmgr.h . +.Pa sys/lock.h . .Pc .It Dv LK_SLEEPFAIL Fail if operation has slept. -- 2.41.0