diff options
author | ache <ache@FreeBSD.org> | 1997-10-22 11:27:20 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1997-10-22 11:27:20 +0000 |
commit | 3cb44cbe93023ab3aaa8f60947d59c2bf33865c5 (patch) | |
tree | 5307d2b5b381fd014416713fba696520333ae768 /lib | |
parent | d25f1a7e1f90e55ebdfd07a4939667dcfd30350b (diff) | |
download | FreeBSD-src-3cb44cbe93023ab3aaa8f60947d59c2bf33865c5.zip FreeBSD-src-3cb44cbe93023ab3aaa8f60947d59c2bf33865c5.tar.gz |
Reflect usleep code changes:
Limit max arg
Change return type to int
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/usleep.3 | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/lib/libc/gen/usleep.3 b/lib/libc/gen/usleep.3 index b5ed4e9..0b03a7c 100644 --- a/lib/libc/gen/usleep.3 +++ b/lib/libc/gen/usleep.3 @@ -39,7 +39,7 @@ .Nd suspend execution for interval of microseconds .Sh SYNOPSIS .Fd #include <unistd.h> -.Ft void +.Ft int .Fn usleep "u_int microseconds" .Sh DESCRIPTION The @@ -52,6 +52,10 @@ of time. System activity or time spent in processing the call may lengthen the sleep slightly. .Pp +The +.Fa microseconds +argument must be less than 1000000. +.Pp If a timer is already running on the process its state is unaltered by this .Fn usleep @@ -67,6 +71,25 @@ This function is implemented using by pausing for .Fa microseconds of time or until any signal occurse. +.Sh RETURN VALUES +The +.Fn usleep +function returns 0 on successful completion. Otherwise, it returns -1 +and sets +.Va errno +to indicate the error. +.Sh ERRORS +The +.Fn usleep +function +will fail if: +.Bl -tag -width [EINVAL] +.It Bq Er EINTR +Some signal occurse. +.It Bq Er EINVAL +The +.Fa microseconds +argument specified 1000000 or more microseconds. .Sh NOTES .Pp A microsecond is 0.000001 seconds. |