Paul Irofti: [lib/libc/arch/*/gen/usertc.c] > +int (*const _tc_get_timecount)(struct timekeep *, uint64_t *) = NULL;
[lib/libc/sys/microtime.c] > +static inline int > +tc_delta(struct timekeep *tk, u_int *delta) > +{ > + uint64_t tc; > + if (delta == NULL || _tc_get_timecount(tk, &tc)) This use of uint64_t for the timecounter return value confused me. All the kernel code uses u_int as the return value of the timecounter_get functions. The userland code should do the same (or uint32_t or whatever the preferred alias is). A central idea is that we can just copy the MD timecounter_get functions from the kernel to the userland code. They all return only 32 bits. (If the hardware register has more bits, like TSC or TICK, the value is truncated.) -- Christian "naddy" Weisgerber na...@mips.inka.de