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 | |
parent | 273d0f5a2d56ee17d75e7a16ad23d0a40ee6a0f0 (diff) | |
download | FreeBSD-src-d9372eab7242eadfd4a3d7c24ca5a0a2046daed7.zip FreeBSD-src-d9372eab7242eadfd4a3d7c24ca5a0a2046daed7.tar.gz |
Add scant documentation for msleep.
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/Makefile | 2 | ||||
-rw-r--r-- | share/man/man9/sleep.9 | 19 |
2 files changed, 20 insertions, 1 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 9a1ceef..968cae9 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -73,7 +73,7 @@ MLINKS+=posix4.9 p1003_1b.9 MLINKS+=psignal.9 gsignal.9 psignal.9 pgsignal.9 MLINKS+=rtalloc.9 rtalloc1.9 rtalloc.9 rtalloc_ign.9 MLINKS+=sleep.9 tsleep.9 sleep.9 wakeup.9 sleep.9 wakeup_one.9 -MLINKS+=sleep.9 asleep.9 sleep.9 await.9 +MLINKS+=sleep.9 asleep.9 sleep.9 await.9 sleep.9 msleep.9 MLINKS+=buf.9 bp.9 MLINKS+=spl.9 spl0.9 MLINKS+=spl.9 splbio.9 spl.9 splclock.9 spl.9 splhigh.9 spl.9 splimp.9 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 |