diff options
Diffstat (limited to 'share/man/man9/sleep.9')
-rw-r--r-- | share/man/man9/sleep.9 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/share/man/man9/sleep.9 b/share/man/man9/sleep.9 index 2079cd3..f371652 100644 --- a/share/man/man9/sleep.9 +++ b/share/man/man9/sleep.9 @@ -30,6 +30,7 @@ .Dt SLEEP 9 .Sh NAME .Nm sleep , +.Nm msleep , .Nm tsleep , .Nm asleep , .Nm await , @@ -42,6 +43,8 @@ .Ft int .Fn tsleep "void *ident" "int priority" "const char *wmesg" "int timo" .Ft int +.Fn msleep "void *ident" "mtx_t *mtx" "int priority" "const char *wmesg" "int timo" +.Ft int .Fn asleep "void *ident" "int priority" "const char *wmesg" "int timo" .Ft int .Fn await "int priority" "int timo" @@ -108,6 +111,22 @@ possible, and is returned if the system call should be interrupted by the signal .Pq return Dv EINTR . .Pp +.Nm Msleep +is a variation on tsleep. The parameter +.Ar mtx +is a mutex, which will be exited before sleeping, and entered before +.Nm msleep +returns. If +.Ar pri +includes the +.Dv PDROP +flag, the +.Ar mtx +parameter will not be entered before returning. The mutex is +used to ensure that a condition can be checked atomicly, and +that the current process can be suspended without missing a +change to the condition, or an associated wakeup. +.Pp .Nm Asleep implements the new asynchronous sleep function. It takes the same arguments as |