Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/sys/clock_gettime.c
Show All 38 Lines | |||||
__weak_reference(__clock_gettime, clock_gettime); | __weak_reference(__clock_gettime, clock_gettime); | ||||
int | int | ||||
__clock_gettime(clockid_t clock_id, struct timespec *ts) | __clock_gettime(clockid_t clock_id, struct timespec *ts) | ||||
{ | { | ||||
int error; | int error; | ||||
if (__vdso_clock_gettime != NULL && __vdso_gettc != NULL) | if (&__vdso_clock_gettime != NULL && &__vdso_gettc != NULL) | ||||
error = __vdso_clock_gettime(clock_id, ts); | error = __vdso_clock_gettime(clock_id, ts); | ||||
else | else | ||||
error = ENOSYS; | error = ENOSYS; | ||||
if (error == ENOSYS) | if (error == ENOSYS) | ||||
error = __sys_clock_gettime(clock_id, ts); | error = __sys_clock_gettime(clock_id, ts); | ||||
return (error); | return (error); | ||||
} | } |