From ba6cf8b767c9a65dc8c933a71cf5fd241d183975 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Fri, 30 Dec 2011 08:33:30 +0100 Subject: [PATCH] uClinux: provide missing system calls. The timerfd calls are missing from Sourcery CodeBench Lite 2011.09-23. We can remove this code once these calls are properly integrated into a current tool chain. Signed-off-by: Richard Cochran --- missing.h | 16 ++++++++++++++++ port.c | 1 + 2 files changed, 17 insertions(+) diff --git a/missing.h b/missing.h index 45dcb2d..7f0af10 100644 --- a/missing.h +++ b/missing.h @@ -49,4 +49,20 @@ static inline int clock_adjtime(clockid_t id, struct timex *tx) return syscall(__NR_clock_adjtime, id, tx); } +#ifdef __uClinux__ + +static inline int timerfd_create(int clockid, int flags) +{ + return syscall(__NR_timerfd_create, clockid, flags); +} + +static inline int timerfd_settime(int fd, int flags, + const struct itimerspec *new_value, + struct itimerspec *old_value) +{ + return syscall(__NR_timerfd_settime, fd, flags, new_value, old_value); +} + +#endif + #endif diff --git a/port.c b/port.c index a3195ff..672cb0d 100644 --- a/port.c +++ b/port.c @@ -26,6 +26,7 @@ #include "bmc.h" #include "clock.h" +#include "missing.h" #include "msg.h" #include "port.h" #include "print.h"