summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorvangyzen <vangyzen@FreeBSD.org>2017-05-01 01:36:54 +0000
committervangyzen <vangyzen@FreeBSD.org>2017-05-01 01:36:54 +0000
commit1f3f7c15d6db5da93247e3a10bb3f1ff40f61915 (patch)
tree2c49170567af964db6609d58aff8eb6a7649f4ce /include
parent57723a7d7f1db867d4acce11b84c8389cefc9acd (diff)
downloadFreeBSD-src-1f3f7c15d6db5da93247e3a10bb3f1ff40f61915.zip
FreeBSD-src-1f3f7c15d6db5da93247e3a10bb3f1ff40f61915.tar.gz
MFC r315526
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. Regenerate syscall files. Relnotes: yes Sponsored by: Dell EMC
Diffstat (limited to 'include')
-rw-r--r--include/time.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/time.h b/include/time.h
index c172538..54c7e49 100644
--- a/include/time.h
+++ b/include/time.h
@@ -169,12 +169,12 @@ void tzset(void);
int clock_getres(clockid_t, struct timespec *);
int clock_gettime(clockid_t, struct timespec *);
int clock_settime(clockid_t, const struct timespec *);
-/* XXX missing: clock_nanosleep() */
int nanosleep(const struct timespec *, struct timespec *);
#endif /* __POSIX_VISIBLE >= 199309 */
#if __POSIX_VISIBLE >= 200112
int clock_getcpuclockid(pid_t, clockid_t *);
+int clock_nanosleep(clockid_t, int, const struct timespec *, struct timespec *);
#endif
#if __POSIX_VISIBLE >= 199506
OpenPOWER on IntegriCloud