X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/59e0d9fe772464b93d835d2a2964457702469a43..1f2f436a38f7ae2d39a943ad2898d8fed4ed2e58:/sys/nanosleep.2 diff --git a/sys/nanosleep.2 b/sys/nanosleep.2 index ef75207..729527b 100644 --- a/sys/nanosleep.2 +++ b/sys/nanosleep.2 @@ -46,25 +46,33 @@ .Sh SYNOPSIS .In time.h .Ft int -.Fn nanosleep "const struct timespec *rqtp" "struct timespec *rmtp" +.Fo nanosleep +.Fa "const struct timespec *rqtp" +.Fa "struct timespec *rmtp" +.Fc .Sh DESCRIPTION -.Fn Nanosleep -causes the calling thread to sleep for the specified time +The +.Fn nanosleep +function causes the calling thread to sleep +for the amount of time specified in +.Fa rqtp (the actual time slept may be longer, due to system latencies and possible limitations in the timer resolution of the hardware). An unmasked signal will -cause it to terminate the sleep early, regardless of the +cause +.Fn nanosleep +to terminate the sleep early, regardless of the .Dv SA_RESTART value on the interrupting signal. .Sh RETURN VALUES -If the +If .Fn nanosleep -function returns because the requested time has elapsed, the value -returned will be zero. +returns because the requested time has elapsed, +the value returned will be zero. .Pp -If the +If .Fn nanosleep -function returns due to the delivery of a signal, the value returned +returns due to the delivery of a signal, the value returned will be the -1, and the global variable .Va errno will be set to indicate the interruption. @@ -79,13 +87,6 @@ The .Fn nanosleep call fails if: .Bl -tag -width Er -.It Bq Er EFAULT -Either -.Fa rqtp -or -.Fa rmtp -points to memory that is not a valid part of the process -address space. .It Bq Er EINTR .Fn nanosleep was interrupted by the delivery of a signal. @@ -93,9 +94,6 @@ was interrupted by the delivery of a signal. .Fa rqtp specified a nanosecond value less than zero or greater than or equal to 1000 million. -.It Bq Er ENOSYS -.Fn nanosleep -is not supported by this implementation. .El .Sh SEE ALSO .Xr sigsuspend 2 ,