aboutsummaryrefslogtreecommitdiff
path: root/share/man/man9/condvar.9
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2004-03-10 15:57:25 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2004-03-10 15:57:25 +0000
commitf5531a094dc9c883f2dad971338da4c719d8ef2a (patch)
tree9681d61912163f852e42095b1743d01241770e54 /share/man/man9/condvar.9
parent7b3832e8d6584565e2023b34533d1a12c2681232 (diff)
downloadsrc-f5531a094dc9c883f2dad971338da4c719d8ef2a.tar.gz
src-f5531a094dc9c883f2dad971338da4c719d8ef2a.zip
- Document cv_broadcastpri().
- Remove references to cv_waitq_*() as they no longer exist.
Notes
Notes: svn path=/head/; revision=126814
Diffstat (limited to 'share/man/man9/condvar.9')
-rw-r--r--share/man/man9/condvar.927
1 files changed, 12 insertions, 15 deletions
diff --git a/share/man/man9/condvar.9 b/share/man/man9/condvar.9
index f51ac936bd30..9f4bb1c415b2 100644
--- a/share/man/man9/condvar.9
+++ b/share/man/man9/condvar.9
@@ -39,8 +39,7 @@
.Nm cv_timedwait_sig ,
.Nm cv_signal ,
.Nm cv_broadcast ,
-.Nm cv_waitq_remove ,
-.Nm cv_waitq_empty ,
+.Nm cv_broadcastpri ,
.Nm cv_wmesg
.Nd kernel condition variable
.Sh SYNOPSIS
@@ -64,9 +63,7 @@
.Ft void
.Fn cv_broadcast "struct cv *cvp"
.Ft void
-.Fn cv_waitq_remove "struct thread *td"
-.Ft int
-.Fn cv_waitq_empty "struct cv *cvp"
+.Fn cv_broadcastpri "struct cv *cvp" "int pri"
.Ft const char *
.Fn cv_wmesg "struct cv *cvp"
.Sh DESCRIPTION
@@ -94,12 +91,14 @@ Threads unblock waiters by calling
.Fn cv_signal
to unblock one waiter, or
.Fn cv_broadcast
+or
+.Fn cv_broadcastpri
to unblock all waiters.
-.Fn cv_waitq_remove
-removes a waiting thread from a condition variable wait queue, if it is on one.
-.Fn cv_waitq_empty
-reports whether there are any waiters on
-.Fa cvp .
+In addition to waking waiters,
+.Fn cv_broadcastpri
+ensures that all of the waiters have a priorty of at least
+.Fa pri
+by raising the priority of any threads that do not.
.Fn cv_wmesg
returns the description string of
.Fa cvp ,
@@ -125,9 +124,10 @@ in conjunction with
A thread must hold
.Fa mp
while calling
-.Fn cv_signal
-or
+.Fn cv_signal ,
.Fn cv_broadcast ,
+or
+.Fn cv_broadcastpri
even though it isn't passed as an argument.
.Pp
When
@@ -167,9 +167,6 @@ and
return 0.
Otherwise, a non-zero error code is returned.
.Pp
-.Fn cv_waitq_empty
-returns non-zero if there are no threads on the wait queue; 0 otherwise.
-.Pp
.Fn cv_wmesg
returns the description string that was passed to
.Fn cv_init .