summaryrefslogtreecommitdiffstats
path: root/share/man/man9/lock.9
diff options
context:
space:
mode:
authordavidc <davidc@FreeBSD.org>2001-12-26 23:14:04 +0000
committerdavidc <davidc@FreeBSD.org>2001-12-26 23:14:04 +0000
commit6b067561b6c9b4ed2b47f2a1a291bca65015c9e7 (patch)
tree098933308a14df670e3b72970203b08aa5f907a1 /share/man/man9/lock.9
parent70547e89ed70bdc238efd1cf623ee7af6ebcdc84 (diff)
downloadFreeBSD-src-6b067561b6c9b4ed2b47f2a1a291bca65015c9e7.zip
FreeBSD-src-6b067561b6c9b4ed2b47f2a1a291bca65015c9e7.tar.gz
Update function definitions and required include files to reflect
the current state of the system. Approved by: alfred
Diffstat (limited to 'share/man/man9/lock.9')
-rw-r--r--share/man/man9/lock.928
1 files changed, 14 insertions, 14 deletions
diff --git a/share/man/man9/lock.9 b/share/man/man9/lock.9
index 5682067..0140ba5 100644
--- a/share/man/man9/lock.9
+++ b/share/man/man9/lock.9
@@ -33,18 +33,18 @@
.Nm lockmgr ,
.Nm lockcount ,
.Nm lockstatus
-.Nd kernel process locking
+.Nd kernel thread locking
.Sh SYNOPSIS
.In sys/types.h
.In sys/lock.h
.Ft void
.Fn lockinit "struct lock *lkp" "int prio" "char *wmesg" "int timo" "int flags"
.Ft int
-.Fn lockmgr "struct lock *lkp" "u_int flags" "struct simplelock *interlkp" "struct proc *p"
+.Fn lockmgr "struct lock *lkp" "u_int flags" "struct mtx *interlkp" "struct thread *td"
.Ft int
.Fn lockcount "struct lock *lkp"
.Ft int
-.Fn lockstatus "struct lock *lkp" "struct proc *p"
+.Fn lockstatus "struct lock *lkp" "struct thread *td"
.Sh DESCRIPTION
The function
.Fn lockinit
@@ -64,35 +64,35 @@ The following values are defined:
.Bl -tag -width "LK_XXXXXXXXXXXX" -compact
.It Dv LK_SHARED
get one of many possible shared locks.
-If a process holding an exclusive lock requests a shared lock,
+If a thread holding an exclusive lock requests a shared lock,
the exclusive lock(s) will be downgraded to shared locks.
.It Dv LK_EXCLUSIVE
stop further shared locks, when they are cleared,
grant a pending upgrade if it exists, then grant an exclusive
lock.
Only one exclusive lock may exist at a time, except that
-a process holding an exclusive lock may get additional exclusive
+a thread holding an exclusive lock may get additional exclusive
locks if it explicitly sets the LK_CANRECURSE flag in the lock
request, or if the LK_CANRECUSE flag was set when the lock was
initialized.
.It Dv LK_UPGRADE
-the process must hold a shared lock that it wants to
+the thread must hold a shared lock that it wants to
have upgraded to an exclusive lock.
-Other processes may get exclusive access to the resource between
+Other threads may get exclusive access to the resource between
the time that the upgrade is requested and the time that it is
granted.
.It Dv LK_EXCLUPGRADE
-the process must hold a shared lock that it wants to
+the thread must hold a shared lock that it wants to
have upgraded to an exclusive lock.
-If the request succeeds, no other processes will have gotten
+If the request succeeds, no other thread will have gotten
exclusive access to the resource between the time that the upgrade
is requested and the time that it is granted.
-However, if another process has already requested an upgrade,
+However, if another thread has already requested an upgrade,
the request will fail.
.It Dv LK_DOWNGRADE
-the process must hold an exclusive lock that it wants
+the thread must hold an exclusive lock that it wants
to have downgraded to a shared lock.
-If the process holds multiple (recursive) exclusive locks,
+If the thread holds multiple (recursive) exclusive locks,
they will all be downgraded to shared locks.
.It Dv LK_RELEASE
release one instance of a lock.
@@ -103,12 +103,12 @@ This feature is used before freeing a lock that is part of a
piece of memory that is about to be freed.
.It Dv LK_EXCLOTHER
return for lockstatus().
-Used when another process holds the lock exclusively.
+Used when another thread holds the lock exclusively.
.El
.Sh RETURN VALUES
Successfully obtained locks return 0.
Locks will always succeed unless one of the following is true:
-LK_FORCEUPGRADE is requested and some other process has already
+LK_FORCEUPGRADE is requested and some other thread has already
requested a lock upgrade; returns
.Er EBUSY .
LK_WAIT is set and a sleep would be required; returns
OpenPOWER on IntegriCloud