24 #include <sys/select.h> 27 #include "pedigree/kernel/process/InfoBlock.h" 34 int __vdso_clock_gettime(clockid_t clock_id,
struct timespec *tp);
35 int __vdso_gettimeofday(
struct timeval *tv,
void *tz);
36 int __vdso_getcpu(
unsigned *cpu,
unsigned *node,
struct getcpu_cache *cache);
37 time_t __vdso_time(time_t *tloc);
39 int __vdso_clock_gettime(clockid_t clock_id,
struct timespec *tp)
43 uint64_t now = infoBlock->
now;
44 tp->tv_sec = now / 1000000000U;
45 tp->tv_nsec = now % 1000000000U;
50 int __vdso_gettimeofday(
struct timeval *tv,
void *tz)
55 uint64_t now = infoBlock->
now;
56 tv->tv_sec = now / 1000000000U;
57 tv->tv_usec = now / 1000U;
65 int __vdso_getcpu(
unsigned *cpu,
unsigned *node,
struct getcpu_cache *cache)
80 time_t __vdso_time(time_t *tloc)
84 *tloc = infoBlock->
now_s;
87 return infoBlock->
now_s;
90 __asm__(
".symver __vdso_clock_gettime,__vdso_clock_gettime@LINUX_2.6");
91 __asm__(
".symver __vdso_gettimeofday,__vdso_gettimeofday@LINUX_2.6");
92 __asm__(
".symver __vdso_getcpu,__vdso_getcpu@LINUX_2.6");
93 __asm__(
".symver __vdso_time,__vdso_time@LINUX_2.6");
95 int clock_gettime(clockid_t,
struct timespec *)
97 int gettimeofday(struct timeval *__restrict,
void *__restrict)
99 int getcpu(
unsigned *,
unsigned *, struct getcpu_cache *)
101 time_t time(time_t *)
__attribute__((weak, alias("__vdso_time")));
uint64_t now
Current timestamp in nanoseconds since the UNIX epoch.
uint64_t now_s
Current timestamp in seconds since the UNIX epoch.