File syn_event_flags.h¶
FileList > sched > syn_event_flags.h
Go to the source code of this file
32-bit Event Flag Group Synchronization. More...
#include "../common/syn_defs.h"#include <stdbool.h>#include <stdint.h>
Classes¶
| Type | Name |
|---|---|
| struct | SYN_EventFlags Event Flags Control Structure. |
Public Types¶
| Type | Name |
|---|---|
| enum | SYN_EventFlagsMode |
Public Functions¶
| Type | Name |
|---|---|
| SYN_Status | syn_event_flags_clear (SYN_EventFlags * ef, uint32_t flags_mask) Clear event flags (Bitwise AND NOT). |
| uint32_t | syn_event_flags_get (const SYN_EventFlags * ef) Get current event flags value without clearing. |
| SYN_Status | syn_event_flags_init (SYN_EventFlags * ef) Initialize an Event Flags instance. |
| SYN_Status | syn_event_flags_set (SYN_EventFlags * ef, uint32_t flags_mask) Set event flags (Bitwise OR). |
| SYN_Status | syn_event_flags_wait (SYN_EventFlags * ef, uint32_t wait_mask, uint32_t mode, uint32_t * out_flags) Non-blocking evaluate/wait for event flags condition. |
Detailed Description¶
Provides a bitmask event group mechanism for tasks and protothreads to set, clear, and wait on single or multiple event bit combinations (WAIT_ALL, WAIT_ANY, auto-clear).
Public Types Documentation¶
enum SYN_EventFlagsMode¶
enum SYN_EventFlagsMode {
SYN_EVENT_FLAGS_WAIT_ANY = 0x01U,
SYN_EVENT_FLAGS_WAIT_ALL = 0x02U,
SYN_EVENT_FLAGS_AUTO_CLEAR = 0x04U
};
Wait mode flags.
Public Functions Documentation¶
function syn_event_flags_clear¶
Clear event flags (Bitwise AND NOT).
Parameters:
efEvent flags context.flags_maskBitmask of flags to clear.
Returns:
SYN_OK on success.
function syn_event_flags_get¶
Get current event flags value without clearing.
Parameters:
efEvent flags context.
Returns:
Current 32-bit flags value.
function syn_event_flags_init¶
Initialize an Event Flags instance.
Parameters:
efEvent flags context.
Returns:
SYN_OK on success.
function syn_event_flags_set¶
Set event flags (Bitwise OR).
Parameters:
efEvent flags context.flags_maskBitmask of flags to set.
Returns:
SYN_OK on success.
function syn_event_flags_wait¶
Non-blocking evaluate/wait for event flags condition.
SYN_Status syn_event_flags_wait (
SYN_EventFlags * ef,
uint32_t wait_mask,
uint32_t mode,
uint32_t * out_flags
)
Parameters:
efEvent flags context.wait_maskBitmask of flags to evaluate.modeCombination of SYN_EVENT_FLAGS_WAIT_ANY/ALL/AUTO_CLEAR.out_flagsOptional pointer receiving matched flags.
Returns:
SYN_OK if condition is satisfied, or SYN_BUSY if not met.
The documentation for this class was generated from the following file src/syntropic/sched/syn_event_flags.h