Theo Veenker wrote:
> May ask a (probably silly) question. Does clock_get/settime(clock_id) in
> /usr/include/time.h and in .../xenomai/include/posix/time.h refer to exactly
> the same clock? Or do these interfaces just refer to similar clocks.
The timing subsystems of Xenomai and Linux are different, so they refer
to similar clocks.
Xenomai's implementation of clock_gettime(CLOCK_MONOTONIC) reads the tsc
(which does not need a syscall on most architectures) and converts it to
a struct timespec, whereas the implementation of
clock_gettime(CLOCK_REALTIME) issues a syscall which reads the tsc, adds
an offset, and convert it to a struct timespec.
clock_settime(CLOCK_REALTIME) adjusts the offset used by
clock_gettime(CLOCK_REALTIME) and runs some timers.
--
Gilles.
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help