OSDN Git Service

Add MS7619SE
[uclinux-h8/uClinux-dist.git] / uClibc / librt / timer_settime.c
1 /*
2  * timer_settime.c - set the timer.
3  */
4
5 #include <errno.h>
6 #include <stdlib.h>
7 #include <time.h>
8 #include <sys/syscall.h>
9
10 #include "kernel-posix-timers.h"
11
12 #ifdef __NR_timer_settime
13
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);
17
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)
21 {
22         struct timer *kt = (struct timer *)timerid;
23
24         /* Set timeout */
25         return __syscall_timer_settime(kt->ktimerid, flags, value, ovalue);
26 }
27
28 #endif