arc: clone: Recover PID correctly
[uclibc-ng.git] / librt / timer_settime.c
blob2703fa913fb83f2539b32a9b560728df4e13ed38
1 /*
2 * timer_settime.c - set the timer.
3 */
5 #include <errno.h>
6 #include <stdlib.h>
7 #include <time.h>
8 #include <sys/syscall.h>
10 #include "kernel-posix-timers.h"
12 #ifdef __NR_timer_settime
14 #define __NR___syscall_timer_settime __NR_timer_settime
15 static __inline__ _syscall4(int, __syscall_timer_settime, kernel_timer_t, ktimerid,
16 int, flags, const void *, value, void *, ovalue);
18 /* Set the expiration time for a timer */
19 int timer_settime(timer_t timerid, int flags, const struct itimerspec *value,
20 struct itimerspec *ovalue)
22 struct timer *kt = (struct timer *)timerid;
24 /* Set timeout */
25 return __syscall_timer_settime(kt->ktimerid, flags, value, ovalue);
28 #endif