Files | |
file | alarm.c |
This file is part of the Xenomai project. | |
Functions | |
int | rt_alarm_create (RT_ALARM *alarm, const char *name, rt_alarm_t handler, void *cookie) |
Create an alarm object from kernel space. | |
int | rt_alarm_delete (RT_ALARM *alarm) |
Delete an alarm. | |
int | rt_alarm_start (RT_ALARM *alarm, RTIME value, RTIME interval) |
Start an alarm. | |
int | rt_alarm_stop (RT_ALARM *alarm) |
Stop an alarm. | |
int | rt_alarm_inquire (RT_ALARM *alarm, RT_ALARM_INFO *info) |
Inquire about an alarm. | |
int | rt_alarm_create (RT_ALARM *alarm, const char *name) |
Create an alarm object from user-space. | |
int | rt_alarm_wait (RT_ALARM *alarm) |
Wait for the next alarm shot. |
|
Create an alarm object from user-space. Initializes an alarm object from a user-space application. Alarms can be made periodic or oneshot, depending on the reload interval value passed to rt_alarm_start() for them. In this mode, the basic principle is to define some alarm server task which routinely waits for the next incoming alarm event through the rt_alarm_wait() syscall.
Environments: This service can be called from:
Rescheduling: possible.
|
|
Create an alarm object from kernel space. Create an object triggering an alarm routine at a specified time in the future. Alarms can be made periodic or oneshot, depending on the reload interval value passed to rt_alarm_start() for them. In kernel space, alarms are immediately notified on behalf of the timer interrupt to a user-defined handler.
Environments: This service can be called from:
Rescheduling: possible.
|
|
Delete an alarm. Destroy an alarm. An alarm exists in the system since rt_alarm_create() has been called to create it, so this service must be called in order to destroy it afterwards.
Environments: This service can be called from:
Rescheduling: never. |
|
Inquire about an alarm. Return various information about the status of a given alarm.
Environments: This service can be called from:
Rescheduling: never. |
|
Start an alarm. Program the trigger date of an alarm object. An alarm can be either periodic or oneshot, depending on the reload value passed to this routine. The given alarm must have been previously created by a call to rt_alarm_create(). Alarm handlers are always called on behalf of Xenomai's internal timer tick handler, so the Xenomai services which can be called from such handlers are restricted to the set of services available on behalf of any ISR. This service overrides any previous setup of the expiry date and reload interval for the given alarm.
Environments: This service can be called from:
Rescheduling: never.
|
|
Stop an alarm. Disarm an alarm object previously armed using rt_alarm_start() so that it will not trigger until is is re-armed.
Environments: This service can be called from:
Rescheduling: never. |
|
Wait for the next alarm shot. This user-space only call allows the current task to suspend execution until the specified alarm triggers. The priority of the current task is raised above all other Xenomai tasks - except those also undergoing an alarm or interrupt wait (see rt_intr_wait()) - so that it would preempt any of them under normal circumstances (i.e. no scheduler lock).
Environments: This service can be called from:
Rescheduling: always. |