[ifxmips]
[openwrt/svn-archive/archive.git] / package / libtapi / src / timer_fd.c
1 /* vi: set sw=4 ts=4: */
2 /*
3 * timerfd_create() / timerfd_settime() / timerfd_gettime() for uClibc
4 *
5 * Copyright (C) 2009 Stephan Raue <stephan@openelec.tv>
6 *
7 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
8 */
9
10 #include <sys/syscall.h>
11 /*#include <sys/timerfd.h>*/
12 #include "timerfd.h"
13
14 /*
15 * timerfd_create()
16 */
17 #ifdef __NR_timerfd_create
18 int timerfd_create(int clockid, int flags)
19 {
20 return syscall(__NR_timerfd_create, clockid, flags);
21 }
22 #endif
23
24 /*
25 * timerfd_settime()
26 */
27 #ifdef __NR_timerfd_settime
28 int timerfd_settime(int ufd, int flags, const struct itimerspec *umtr, struct itimerspec *otmr)
29 {
30 return syscall(__NR_timerfd_settime, ufd, flags, umtr, otmr);
31 }
32 #endif
33