From cd6b4fb45d054d53af92bc0b3685e8bd9f01445d Mon Sep 17 00:00:00 2001 From: Maschell Date: Sun, 10 Apr 2022 12:36:44 +0200 Subject: [PATCH] Fix syscall_clock implementation --- libraries/wutnewlib/wut_newlib.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/libraries/wutnewlib/wut_newlib.c b/libraries/wutnewlib/wut_newlib.c index c19362db..4356ec77 100644 --- a/libraries/wutnewlib/wut_newlib.c +++ b/libraries/wutnewlib/wut_newlib.c @@ -5,7 +5,7 @@ void(*__wut_exit)(int rc); extern void __fini_wut(void); int __syscall_lock_init(int *lock, int recursive) { - return __wut_lock_init(lock,recursive); + return __wut_lock_init(lock, recursive); } int __syscall_lock_close(int *lock) { @@ -25,14 +25,25 @@ void __syscall_exit(int rc) { __wut_exit(rc); } -int __syscall_gettod_r(struct _reent *ptr, struct timeval *tp, struct timezone *tz){ - return __wut_gettod_r(ptr,tp,tz); +int __syscall_gettod_r(struct _reent *ptr, struct timeval *tp, struct timezone *tz) { + return __wut_gettod_r(ptr, tp, tz); } -int __syscall_nanosleep(const struct timespec *req, struct timespec *rem){ +int __syscall_nanosleep(const struct timespec *req, struct timespec *rem) { return __wut_nanosleep(req, rem); } +int __syscall_clock_gettime(clockid_t clock_id, struct timespec *tp) { + return __wut_clock_gettime(clock_id, tp); +} + +int __syscall_clock_settime(clockid_t clock_id, const struct timespec *tp) { + return __wut_clock_settime(clock_id, tp); +} + +int __syscall_clock_getres(clockid_t clock_id, struct timespec *res) { + return __wut_clock_getres(clock_id, res); +} void __init_wut_newlib()