freebsd-skq/lib/libc
Eric van Gyzen 3f8455b090 Add clock_nanosleep()
Add a clock_nanosleep() syscall, as specified by POSIX.
Make nanosleep() a wrapper around it.

Attach the clock_nanosleep test from NetBSD. Adjust it for the
FreeBSD behavior of updating rmtp only when interrupted by a signal.
I believe this to be POSIX-compliant, since POSIX mentions the rmtp
parameter only in the paragraph about EINTR. This is also what
Linux does. (NetBSD updates rmtp unconditionally.)

Copy the whole nanosleep.2 man page from NetBSD because it is complete
and closely resembles the POSIX description. Edit, polish, and reword it
a bit, being sure to keep any relevant text from the FreeBSD page.

Reviewed by:	kib, ngie, jilles
MFC after:	3 weeks
Relnotes:	yes
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D10020
2017-03-19 00:51:12 +00:00
..
aarch64 Correct an misunderstanding of MDSRCS. 2017-03-02 17:07:28 +00:00
amd64 Correct an misunderstanding of MDSRCS. 2017-03-02 17:07:28 +00:00
arm Correct an misunderstanding of MDSRCS. 2017-03-02 17:07:28 +00:00
capability Replace dot-dot relative pathing with SRCTOP-relative paths where possible 2017-01-20 03:23:24 +00:00
compat-43 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
db Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
gdtoa For now, compile all of contrib/gdtoa without requiring strict aliasing, 2017-02-13 20:13:29 +00:00
gen Discard first 3072 bytes of RC4 keystream, this is a bandaid 2017-03-14 06:00:44 +00:00
gmon Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
i386 Correct an misunderstanding of MDSRCS. 2017-03-02 17:07:28 +00:00
iconv libc: provide some bounds-checking through reallocarray(3). 2017-03-12 16:03:34 +00:00
include Add clock_nanosleep() 2017-03-19 00:51:12 +00:00
inet Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
isc libc: do not include <sys/types.h> where <sys/param.h> was already included 2016-04-18 21:05:15 +00:00
locale Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
md Replace dot-dot relative pathing with SRCTOP-relative paths where possible 2017-01-20 03:23:24 +00:00
mips Replace SOFTFLOAT with __mips_soft_float, which gcc/clang define for us. 2017-03-16 21:05:21 +00:00
nameser libc: spelling fixes. 2016-04-30 01:24:24 +00:00
net libc: provide some bounds-checking through reallocarray(3). 2017-03-12 16:03:34 +00:00
nls Use current locale (f.e. set by thread). It was global locale always 2016-08-24 16:44:27 +00:00
posix1e Replace dot-dot relative pathing with SRCTOP-relative paths where possible 2017-01-20 03:23:24 +00:00
powerpc Correct an misunderstanding of MDSRCS. 2017-03-02 17:07:28 +00:00
powerpc64 Correct an misunderstanding of MDSRCS. 2017-03-02 17:07:28 +00:00
powerpcspe Correct an misunderstanding of MDSRCS. 2017-03-02 17:07:28 +00:00
quad Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
regex libc: provide some bounds-checking through reallocarray(3). 2017-03-12 16:03:34 +00:00
resolv Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
riscv Correct an misunderstanding of MDSRCS. 2017-03-02 17:07:28 +00:00
rpc libc: provide some bounds-checking through reallocarray(3). 2017-03-12 16:03:34 +00:00
secure libc: do not include <sys/types.h> where <sys/param.h> was already included 2016-04-18 21:05:15 +00:00
softfloat Add full softfloat and hardfloat support for RISC-V. 2016-11-16 15:21:32 +00:00
sparc64 Correct an misunderstanding of MDSRCS. 2017-03-02 17:07:28 +00:00
stdio libc: provide some bounds-checking through reallocarray(3). 2017-03-12 16:03:34 +00:00
stdlib Minor libc cleanup: let calloc(3) do the multiplication. 2017-03-13 04:14:03 +00:00
stdtime Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
string libc: add reference to two-way algorithm and bad shift table in memmem/strstr 2017-03-18 00:53:24 +00:00
sys Add clock_nanosleep() 2017-03-19 00:51:12 +00:00
tests Add clock_nanosleep() 2017-03-19 00:51:12 +00:00
uuid libc: replace 0 with NULL for pointers. 2016-04-10 19:33:58 +00:00
x86/sys Remove unneeded variable initialization from r314319. 2017-02-26 22:15:39 +00:00
xdr libc/xdr: unsign some loop indexes. 2016-05-06 16:03:40 +00:00
yp Use on crypto.x and rpc.x from the source tree. 2016-06-28 19:53:16 +00:00
libc_nossp.ldscript Add different libc ldscript: the one without libssp -- 2016-10-12 13:19:21 +00:00
libc.ldscript
Makefile Replace dot-dot relative pathing with SRCTOP-relative paths where possible 2017-01-20 03:23:24 +00:00
Makefile.depend DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
Versions.def Create namespace for the symbols added during 12-CURRENT cycle. 2016-08-06 13:28:58 +00:00