jvidal@disca.upv.es
J.
Vidal
2002-12-12
timer_create
3
timer_create
create a per RTLinux process timer.
#include <signal.h>
int timer_create
clockid_t clockid
struct sigevent * restrict evp
timer_t *restrict timerid
DESCRIPTION
This is a RTLinux version of the POSIX function timer_create() .
The timer_create() function creates a per RTLinux process timer using the specified clock, clock_id, as the timing base. For further details see UNIX spec sigaction, UNIX spec timer_create
NOTES
In RTLinux timer_create should be called from init_module. A timer created from the RTLinux process, is available to all its threads. RTLinux Timers implementation supports both CLOCK_REALTIME and CLOCK_MONOTONIC.
RETURN VALUE
If the call succeeds, timer_create() shall return zero and update the location referenced by timerid to a timer_t, which can be passed to the per-process timer calls. If an error occurs, the function shall return a value of -1 and set errno to indicate the error. The value of timerid is undefined if an error occurs.
ERRORS
The timer_create() function shall fail if:
[EAGAIN]: timer_create isn't called from Linux thread (init_module).
[EINVAL]: The specified clock ID is not defined.
AUTHOR
Josep Vidal < jvidal@disca.upv.es>
SEE ALSO
clock_getres
timer_delete
timer_getoverrun