Xenomai  3.0-rc7
Clock services
Collaboration diagram for Clock services:

Functions

int xnclock_register (struct xnclock *clock)
 Register a Xenomai clock. More...
 
void xnclock_deregister (struct xnclock *clock)
 Deregister a Xenomai clock. More...
 
void xnclock_tick (struct xnclock *clock)
 Process a clock tick. More...
 
void xnclock_adjust (struct xnclock *clock, xnsticks_t delta)
 Adjust a clock time. More...
 

Detailed Description

Function Documentation

void xnclock_adjust ( struct xnclock *  clock,
xnsticks_t  delta 
)

Adjust a clock time.

This service changes the epoch for the given clock by applying the specified tick delta on its wallclock offset.

Parameters
clockThe clock to adjust.
deltaThe adjustment value expressed in nanoseconds.
Tags
task-unrestricted, atomic-entry
Note
Xenomai tracks the system time in nkclock, as a monotonously increasing count of ticks since the epoch. The epoch is initially the same as the underlying machine time.
void xnclock_deregister ( struct xnclock *  clock)

Deregister a Xenomai clock.

This service uninstalls a Xenomai clock previously registered with xnclock_register().

This service may be called once all timers driven by clock have been stopped.

Parameters
clockThe clock to deregister.
Tags
secondary-only
int xnclock_register ( struct xnclock *  clock)

Register a Xenomai clock.

This service installs a new clock which may be used to drive Xenomai timers.

Parameters
clockThe new clock to register.
Tags
secondary-only
void xnclock_tick ( struct xnclock *  clock)

Process a clock tick.

This routine processes an incoming clock event, firing elapsed timers as appropriate.

Parameters
clockThe clock for which a new event was received.
Tags
coreirq-only, atomic-entry
Note
The current CPU must be part of the real-time affinity set, otherwise weird things may happen.

References xnsched::htimer, xnsched::lflags, and xnsched::status.