Add clock_settime and clock_nanosleep.
Add the missing prototypes, fix the existing prototypes to use clockid_t
rather than int, fix clock_nanosleep's failure behavior, and add simple
tests.
Bug: 17644443
Bug: https://code.google.com/p/android/issues/detail?id=77372
Change-Id: I03fba369939403918abcabae9551a7123953d780
Signed-off-by: Haruki Hasegawa <h6a.h4i.0@gmail.com>
diff --git a/libc/SYSCALLS.TXT b/libc/SYSCALLS.TXT
index 47b7ef8..866671d 100644
--- a/libc/SYSCALLS.TXT
+++ b/libc/SYSCALLS.TXT
@@ -202,9 +202,9 @@
int settimeofday(const struct timeval*, const struct timezone*) all
clock_t times(struct tms*) all
int nanosleep(const struct timespec*, struct timespec*) all
-int clock_settime(clockid_t clk_id, const struct timespec* tp) all
-int clock_getres(clockid_t clk_id, struct timespec* res) all
-int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec* req, struct timespec* rem) all
+int clock_settime(clockid_t, const struct timespec*) all
+int clock_getres(clockid_t, struct timespec*) all
+int __clock_nanosleep:clock_nanosleep(clockid_t, int, const struct timespec*, struct timespec*) all
int getitimer(int, const struct itimerval*) all
int setitimer(int, const struct itimerval*, struct itimerval*) all
int __timer_create:timer_create(clockid_t clockid, struct sigevent* evp, __kernel_timer_t* timerid) all