yuezonghe | 824eb0c | 2024-06-27 02:32:26 -0700 | [diff] [blame^] | 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 | |
| 13 | /* |
| 14 | * timerfd_create() |
| 15 | */ |
| 16 | #ifdef __NR_timerfd_create |
| 17 | _syscall2(int, timerfd_create, int, clockid, int, flags) |
| 18 | #endif |
| 19 | |
| 20 | /* |
| 21 | * timerfd_settime() |
| 22 | */ |
| 23 | #ifdef __NR_timerfd_settime |
| 24 | _syscall4(int,timerfd_settime, int, ufd, int, flags, const struct itimerspec *, utmr, struct itimerspec *, otmr) |
| 25 | #endif |
| 26 | |
| 27 | /* |
| 28 | * timerfd_gettime() |
| 29 | */ |
| 30 | #ifdef __NR_timerfd_gettime |
| 31 | _syscall2(int, timerfd_gettime, int, ufd, struct itimerspec *, otmr) |
| 32 | #endif |