![]() |
RTEMS 6.1
|
This group contains the implementation to execute a routine only once. More...
Files | |
| file | onceimpl.h |
| This header file provides the interfaces of the Execute Once Support. | |
| file | once.c |
| This source file contains the implementation of _Once(), _Once_Lock(), and _Once_Unlock(). | |
Functions | |
| int | _Once (unsigned char *once_state, void(*init_routine)(void)) |
| Reacts according to the state of once_state. | |
This group contains the implementation to execute a routine only once.
| int _Once | ( | unsigned char * | once_state, |
| void(*)(void) | init_routine | ||
| ) |
Reacts according to the state of once_state.
If once_state is ONCE_STATE_INIT, then the once state is set first to ONCE_STATE_RUNNING and after calling the init routine it is set to ONCE_STATE_COMPLETED. If once_state is ONCE_STATE_COMPLETED, nothing happens. If once_state is not either one, this method waits for the Once_Information_Mutex.
| once_state | The once state. |
| init_routine | The initialization routine called if once_state is ONCE_STATE_INIT. |