summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorcheloha <cheloha@openbsd.org>2018-12-31 18:54:00 +0000
committercheloha <cheloha@openbsd.org>2018-12-31 18:54:00 +0000
commit353098857730fce409d995974ae8d26b78f379fa (patch)
tree2d3c327731179bc94d9f8d69b47f2ce415b76821 /lib/libc
parentImplement fractional PLL frequencies for RK3328 and use them for APLL and (diff)
downloadwireguard-openbsd-353098857730fce409d995974ae8d26b78f379fa.tar.xz
wireguard-openbsd-353098857730fce409d995974ae8d26b78f379fa.zip
nanosleep: loop tsleep(9) to ensure coverage of the full timeout range.
tsleep(9)'s maximum timeout shrinks as HZ grows, so this ensures we do not return early from longer timeouts on alpha or on custom kernels. POSIX says you cannot return early unless a signal is delivered, so this makes us more compliant with the standard. While here, remove the 100 million second upper bound. It is an artifact from itimerfix() and it serves no discernible purpose. ok tedu@ visa@
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/sys/nanosleep.29
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libc/sys/nanosleep.2 b/lib/libc/sys/nanosleep.2
index 062597e4163..63e4e4e365b 100644
--- a/lib/libc/sys/nanosleep.2
+++ b/lib/libc/sys/nanosleep.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: nanosleep.2,v 1.15 2015/05/31 23:54:25 schwarze Exp $
+.\" $OpenBSD: nanosleep.2,v 1.16 2018/12/31 18:54:00 cheloha Exp $
.\" $NetBSD: nanosleep.2,v 1.1 1997/04/17 18:12:02 jtc Exp $
.\"
.\" Copyright (c) 1986, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)sleep.3 8.1 (Berkeley) 6/4/93
.\"
-.Dd $Mdocdate: May 31 2015 $
+.Dd $Mdocdate: December 31 2018 $
.Dt NANOSLEEP 2
.Os
.Sh NAME
@@ -76,8 +76,9 @@ to the corresponding value.
was interrupted by the delivery of a signal.
.It Bq Er EINVAL
.Fa timeout
-specified a nanosecond value less than zero or greater than 1000 million,
-or a second value less than zero or greater than 100 million.
+specified a nanosecond value less than zero or greater than or equal to
+1000 million,
+or a second value less than zero.
.It Bq Er EFAULT
Either
.Fa timeout