summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-06-01 09:47:06 +0000
committerpeter <peter@FreeBSD.org>1997-06-01 09:47:06 +0000
commit6e813d52f9cb3053898b05c707d5952052edd672 (patch)
treee91553494c2c2dcbb5b499e28933cd6c534ccd6b /lib
parentea6c9e20fb781eb0f647056306bf4398639814e6 (diff)
downloadFreeBSD-src-6e813d52f9cb3053898b05c707d5952052edd672.zip
FreeBSD-src-6e813d52f9cb3053898b05c707d5952052edd672.tar.gz
Doc signanosleep, add to links
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/Makefile.inc3
-rw-r--r--lib/libc/sys/nanosleep.229
2 files changed, 28 insertions, 4 deletions
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc
index 6207f50..fbe9067 100644
--- a/lib/libc/sys/Makefile.inc
+++ b/lib/libc/sys/Makefile.inc
@@ -1,5 +1,5 @@
# @(#)Makefile.inc 8.3 (Berkeley) 10/24/94
-# $Id: Makefile.inc,v 1.32 1997/05/12 12:18:14 peter Exp $
+# $Id: Makefile.inc,v 1.33 1997/06/01 09:20:30 peter Exp $
# sys sources
.PATH: ${.CURDIR}/../libc/${MACHINE}/sys ${.CURDIR}/../libc/sys
@@ -139,6 +139,7 @@ MLINKS+=intro.2 errno.2
MLINKS+=lseek.2 seek.2
MLINKS+=mlock.2 munlock.2
MLINKS+=mount.2 unmount.2
+MLINKS+=nanosleep.2 signanosleep.2
MLINKS+=pathconf.2 fpathconf.2
MLINKS+=read.2 readv.2
MLINKS+=recv.2 recvfrom.2 recv.2 recvmsg.2
diff --git a/lib/libc/sys/nanosleep.2 b/lib/libc/sys/nanosleep.2
index 956036d..598ce1b 100644
--- a/lib/libc/sys/nanosleep.2
+++ b/lib/libc/sys/nanosleep.2
@@ -1,4 +1,4 @@
-.\" $Id$
+.\" $Id: nanosleep.2,v 1.1 1997/05/12 12:15:35 peter Exp $
.\" $OpenBSD: nanosleep.2,v 1.1 1997/04/20 20:56:20 tholo Exp $
.\" $NetBSD: nanosleep.2,v 1.1 1997/04/17 18:12:02 jtc Exp $
.\"
@@ -39,12 +39,29 @@
.Dt NANOSLEEP 2
.Os
.Sh NAME
-.Nm nanosleep
+.Nm nanosleep ,
+.Nm signanosleep
.Sh SYNOPSIS
.Fd #include <time.h>
.Ft int
.Fn nanosleep "const struct timespec *rqtp" "struct timespec *rmtp"
-.\" .Sh DESCRIPTION
+.Pp
+.Fd #include <signal.h>
+.Fd #include <time.h>
+.Ft int
+.Fn signanosleep "const struct timespec *rqtp" "struct timespec *rmtp" "sigset_t *mask"
+.Sh DESCRIPTION
+.Fn Nanosleep
+causes the process to sleep for the specified time. An unmasked signal will
+cause it to terminate the sleep early, regardless of the
+.Dv SA_RESTART
+value on the interrupting signal.
+.Pp
+The
+.Fn signanosleep
+function temporarily (and atomically) sets the signal mask of the process
+for the duration of the system call so that specific signals can be
+nominated to cause an early termination of the sleep.
.Sh RETURN VALUE
If the
.Fn nanosleep
@@ -88,9 +105,15 @@ specified a nanosecond value less than zero or greater than 1000 million.
is not supported by this implementation.
.El
.Sh SEE ALSO
+.Xr sigsuspend 2
.Xr sleep 3
.Sh STANDARDS
The
.Fn nanosleep
function conforms to
.St -p1003.1b-93 .
+.Pp
+The
+.Fn signanosleep
+function is an extenstion that first appeared in
+.Fx 3.0
OpenPOWER on IntegriCloud