Introduce time64 support.
[uclibc-ng.git] / libc / sysdeps / linux / common / timerfd.c
blob0f19b44ed6077b0eab1b9dfa4841c38ad0a7ec6c
1 /*
2 * timerfd_create() / timerfd_settime() / timerfd_gettime() for uClibc
4 * Copyright (C) 2009 Stephan Raue <stephan@openelec.tv>
6 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
7 */
9 #include <sys/syscall.h>
10 #include <sys/timerfd.h>
13 * timerfd_create()
15 #ifdef __NR_timerfd_create
16 _syscall2(int, timerfd_create, int, clockid, int, flags)
17 #endif
20 * timerfd_settime()
22 #if defined(__NR_timerfd_settime) || defined(__NR_timerfd_settime64)
23 #if defined(__UCLIBC_USE_TIME64__) && defined(__NR_timerfd_settime64)
24 _syscall4_64(int, timerfd_settime, int, ufd, int, flags, const struct itimerspec *, utmr, struct itimerspec *, otmr)
25 #else
26 _syscall4(int, timerfd_settime, int, ufd, int, flags, const struct itimerspec *, utmr, struct itimerspec *, otmr)
27 #endif
28 #endif
31 * timerfd_gettime()
33 #if defined(__NR_timerfd_gettime) || defined(__NR_timerfd_gettime64)
34 #if defined(__UCLIBC_USE_TIME64__) && defined(__NR_timerfd_gettime64)
35 _syscall2_64(int, timerfd_gettime, int, ufd, struct itimerspec *, otmr)
36 #else
37 _syscall2(int, timerfd_gettime, int, ufd, struct itimerspec *, otmr)
38 #endif
39 #endif