- Document cv_broadcastpri().

- Remove references to cv_waitq_*() as they no longer exist.
This commit is contained in:
jhb 2004-03-10 15:57:25 +00:00
parent 08af5a76fe
commit 82864cac2a
2 changed files with 13 additions and 17 deletions

View File

@ -388,14 +388,13 @@ MLINKS+=byteorder.9 be16dec.9 \
byteorder.9 le64enc.9 \
byteorder.9 le64toh.9
MLINKS+=condvar.9 cv_broadcast.9 \
condvar.9 cv_broadcastpri.9 \
condvar.9 cv_destroy.9 \
condvar.9 cv_init.9 \
condvar.9 cv_signal.9 \
condvar.9 cv_timedwait.9 \
condvar.9 cv_timedwait_sig.9 \
condvar.9 cv_wait.9 \
condvar.9 cv_waitq_empty.9 \
condvar.9 cv_waitq_remove.9 \
condvar.9 cv_wait_sig.9 \
condvar.9 cv_wmesg.9
MLINKS+=copy.9 copyin.9 \

View File

@ -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 .