diff options
author | jake <jake@FreeBSD.org> | 2000-09-11 00:52:31 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2000-09-11 00:52:31 +0000 |
commit | d9372eab7242eadfd4a3d7c24ca5a0a2046daed7 (patch) | |
tree | f7bbadb71a9aad956029618eccf55dc28443be31 /share/man/man9/sleep.9 | |
parent | 273d0f5a2d56ee17d75e7a16ad23d0a40ee6a0f0 (diff) | |
download | FreeBSD-src-d9372eab7242eadfd4a3d7c24ca5a0a2046daed7.zip FreeBSD-src-d9372eab7242eadfd4a3d7c24ca5a0a2046daed7.tar.gz |
Add scant documentation for msleep.
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 |