Files | |
file | alarm.c |
This file is part of the RTAI project. | |
Functions | |
int | rt_alarm_create (RT_ALARM *alarm, const char *name, rt_alarm_t handler, void *cookie) |
Create an alarm object. | |
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_wait (RT_ALARM *alarm) |
Wait for the next alarm shot. |
|
Create an alarm object. Create an object calling an alarm routine at specified times. Alarms can be made periodic or aperiodic, depending on the reload interval value passed to rt_alarm_start() for them.
Environments: This service can be called from:
Rescheduling: never. |
|
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 single-shot, 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 RTAI's internal timer tick handler, so the RTAI 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 RTAI tasks - except those also undergoing an alarm 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. |