Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/lib/libc/sys Pull up revision 1.3 (requested by fair):
details: https://anonhg.NetBSD.org/src/rev/861b1e55575a
branches: netbsd-1-4
changeset: 470755:861b1e55575a
user: he <he%NetBSD.org@localhost>
date: Fri Jul 07 18:02:52 2000 +0000
description:
Pull up revision 1.3 (requested by fair):
Provide text in the DESCRIPTION section.
Fixes PR#10072.
diffstat:
lib/libc/sys/nanosleep.2 | 30 ++++++++++++++++++++----------
1 files changed, 20 insertions(+), 10 deletions(-)
diffs (72 lines):
diff -r b2337e902833 -r 861b1e55575a lib/libc/sys/nanosleep.2
--- a/lib/libc/sys/nanosleep.2 Fri Jul 07 17:59:21 2000 +0000
+++ b/lib/libc/sys/nanosleep.2 Fri Jul 07 18:02:52 2000 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: nanosleep.2,v 1.1 1997/04/17 18:12:02 jtc Exp $
+.\" $NetBSD: nanosleep.2,v 1.1.4.1 2000/07/07 18:02:52 he Exp $
.\"
.\" Copyright (c) 1986, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -35,35 +35,45 @@
.\"
.Dd April 17, 1997
.Dt NANOSLEEP 2
-.Os
+.Os
.Sh NAME
.Nm nanosleep
.Sh SYNOPSIS
.Fd #include <time.h>
.Ft int
.Fn nanosleep "const struct timespec *rqtp" "struct timespec *rmtp"
-.\" .Sh DESCRIPTION
+.Sh DESCRIPTION
+The
+.Fn nanosleep
+suspends execution of the calling process until either the number of
+seconds and nanoseconds specified by
+.Fa rqtp
+have elapsed or a signal is delivered to the calling process and its
+action is to invoke a signal catching function or to terminate the
+process.
+The suspension time may be longer than requested due to the
+scheduling of other activity by the system.
.Sh RETURN VALUE
-If the
+If the
.Fn nanosleep
function returns because the requested time has elapsed, the value
-returned will be zero.
+returned will be zero.
.Pp
-If the
+If the
.Fn nanosleep
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.
-If
+If
.Fa rmtp
-is
+is
.Pf non- Dv NULL ,
the timespec structure it references is updated to contain the
unslept amount (the request time minus the time actually slept).
.Sh ERRORS
If any of the following conditions occur, the
-.Nm
+.Nm
function shall return -1 and set
.Va errno
to the corresponding value.
@@ -71,7 +81,7 @@
.It Bq Er EFAULT
Either
.Fa rqtp
-or
+or
.Fa rmtp
points to memory that is not a valid part of the process
address space.
Home |
Main Index |
Thread Index |
Old Index