Subject: kern/14367: lock(9) man page typos/improvements
To: None <gnats-bugs@gnats.netbsd.org>
From: Anthony Mallet <anthony.mallet@useless-ficus.net>
List: netbsd-bugs
Date: 10/27/2001 00:10:03
>Number: 14367
>Category: kern
>Synopsis: lock(9) man page typos/improvements
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Fri Oct 26 15:11:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Anthony Mallet
>Release: -current
>Organization:
>Environment:
System: NetBSD ficus 1.5Y NetBSD 1.5Y (FICUS) #13: Fri Oct 26 23:43:01 CEST 2001 toto@ficus:/home/src/netbsd-current/sys/arch/i386/compile/FICUS i386
Architecture: i386
Machine: i386
>Description:
. A typo: simple_lock_unlock instead of simple_unlock
. The LK_INTERLOCK flags wasn't described (for lockmgr)
>How-To-Repeat:
n/a
>Fix:
--- lock.9~ Mon Sep 10 19:51:30 2001
+++ lock.9 Fri Oct 26 23:57:22 2001
@@ -58,7 +58,7 @@
.Ft int
.Fn simple_lock_try "struct simplelock *slock"
.Ft void
-.Fn simple_lock_unlock "struct simplelock *slock"
+.Fn simple_unlock "struct simplelock *slock"
.Ft void
.Fn simple_lock_freecheck "void *start" "void *end"
.Ft void
@@ -137,7 +137,7 @@
without spinning. If the simplelock is held by another thread
then the return value is 0. If the simplelock was acquired
successfully then the return value is 1.
-.It Fn simple_lock_unlock "slock"
+.It Fn simple_unlock "slock"
The simplelock
.Fa slock
is unlocked. The simplelock must be locked and the calling thread must
@@ -196,11 +196,16 @@
.It Fa lock
The lock.
.It Fa slock
-Simplelock interlock. The simplelock
+Simplelock interlock. If the flag LK_INTERLOCK is set in
+.Fa flags ,
.Fa slock
-is set by the caller. When the lock
+must point to a valid interlock that is already held by the caller. When
+the lock
.Fa lock
-is acquired, the simplelock is released.
+is acquired, the simplelock is released. If the flag LK_INTERLOCK is not
+set,
+.Fa slock
+is unused.
.It Fa flags
Flags to specify the lock request type. In addition to the flags
specified above, the following flags are valid:
>Release-Note:
>Audit-Trail:
>Unformatted: