Loading...
sys/nanosleep.2 Libc-1725.40.4 Libc-391
--- Libc/Libc-1725.40.4/sys/nanosleep.2
+++ Libc/Libc-391/sys/nanosleep.2
@@ -46,33 +46,25 @@
 .Sh SYNOPSIS
 .In time.h
 .Ft int
-.Fo nanosleep
-.Fa "const struct timespec *rqtp"
-.Fa "struct timespec *rmtp"
-.Fc
+.Fn nanosleep "const struct timespec *rqtp" "struct timespec *rmtp"
 .Sh DESCRIPTION
-The
-.Fn nanosleep
-function causes the calling thread to sleep
-for the amount of time specified in
-.Fa rqtp
+.Fn Nanosleep
+causes the calling thread to sleep for the specified time
 (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
-.Fn nanosleep
-to terminate the sleep early, regardless of the
+cause it to terminate the sleep early, regardless of the
 .Dv SA_RESTART
 value on the interrupting signal.
 .Sh RETURN VALUES
-If
+If the
 .Fn nanosleep
-returns because the requested time has elapsed,
-the value returned will be zero.
+function returns because the requested time has elapsed, the value
+returned will be zero.
 .Pp
-If
+If the
 .Fn nanosleep
-returns due to the delivery of a signal, the value returned
+function 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.
@@ -87,6 +79,13 @@
 .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.
@@ -94,6 +93,9 @@
 .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 ,