CMSIS-RTOS RTX
Version 4.80
CMSIS-RTOS RTX: Real-Time Operating System for Cortex-M processor-based devices
|
Control or wait for signal flags. More...
Macros | |
#define | osFeature_Signals 16 |
16 Signal Flags available per thread | |
Functions | |
int32_t | osSignalSet (osThreadId thread_id, int32_t signals) |
Set the specified Signal Flags of an active thread. | |
int32_t | osSignalClear (osThreadId thread_id, int32_t signals) |
Clear the specified Signal Flags of an active thread. | |
os_InRegs osEvent | osSignalWait (int32_t signals, uint32_t millisec) |
Wait for one or more Signal Flags to become signaled for the current RUNNING thread. | |
The Signal Management function group allows to control or wait signal flags. Each thread has assigned signal flags.
#define osFeature_Signals 16 |
CMSIS-RTOS RTX supports up to 16 signal flags per thread.
int32_t osSignalClear | ( | osThreadId | thread_id, |
int32_t | signals | ||
) |
[in] | thread_id | thread ID obtained by osThreadCreate or osThreadGetId. |
[in] | signals | specifies the signal flags of the thread that shall be cleared. |
Clear the signal flags of an active thread. This function cannot be called from interrupt service routines.
Example
int32_t osSignalSet | ( | osThreadId | thread_id, |
int32_t | signals | ||
) |
[in] | thread_id | thread ID obtained by osThreadCreate or osThreadGetId. |
[in] | signals | specifies the signal flags of the thread that should be set. |
Set the signal flags of an active thread.
Example
osEvent osSignalWait | ( | int32_t | signals, |
uint32_t | millisec | ||
) |
[in] | signals | wait until all specified signal flags set or 0 for any single signal flag. |
[in] | millisec | Timout Value or 0 in case of no time-out. |
Suspend the execution of the current RUNNING thread until all specified signal flags with the parameter signals are set. When this signal flags are already set, the function returns instantly. Otherwise the thread is put into the state WAITING. Signal flags that are reported as event are automatically cleared.
The argument millisec specifies how long the system waits for the specified signal flags. While the system waits the tread calling this function is put into the state WAITING. The timeout value can have the following values:
Example