File syn_event.h¶
FileList > src > syntropic > util > syn_event.h
Go to the source code of this file
Event flag groups — 32-bit bitmask signaling. More...
#include "../common/syn_defs.h"#include "../pt/syn_pt.h"#include "../sched/syn_event_flags.h"#include "../util/syn_bits.h"#include <stdbool.h>
Public Types¶
| Type | Name |
|---|---|
| typedef SYN_EventFlags | SYN_EventGroup Event flag group — alias for SYN_EventFlags . |
Public Static Functions¶
| Type | Name |
|---|---|
| bool | syn_event_check_all (const SYN_EventGroup * grp, uint32_t mask) Check if ALL bits in mask are set. |
| bool | syn_event_check_any (const SYN_EventGroup * grp, uint32_t mask) Check if ANY bit in mask is set. |
| void | syn_event_clear (SYN_EventGroup * grp, uint32_t mask) Clear one or more event flags. |
| uint32_t | syn_event_get (const SYN_EventGroup * grp) Get the current value of all flags. |
| void | syn_event_init (SYN_EventGroup * grp) Initialize an event group. |
| void | syn_event_set (SYN_EventGroup * grp, uint32_t mask) Set one or more event flags. |
Macros¶
| Type | Name |
|---|---|
| define | PT_WAIT_EVENT (pt, grp, mask) /* multi line expression */Block the protothread until ALL bits in mask are set, then auto-clear. |
| define | PT_WAIT_EVENT_ANY (pt, grp, mask) /* multi line expression */Block the protothread until ANY bit in mask is set, then auto-clear. |
Detailed Description¶
Unified event signaling delegating directly to SYN_EventFlags.
Public Types Documentation¶
typedef SYN_EventGroup¶
Event flag group — alias for SYN_EventFlags .
Public Static Functions Documentation¶
function syn_event_check_all¶
Check if ALL bits in mask are set.
Parameters:
grpEvent group.maskBitmask to test.
Returns:
true if every bit in mask is set in the event group.
function syn_event_check_any¶
Check if ANY bit in mask is set.
Parameters:
grpEvent group.maskBitmask to test.
Returns:
true if at least one bit in mask is set.
function syn_event_clear¶
Clear one or more event flags.
Parameters:
grpEvent group.maskBitmask of flags to clear.
function syn_event_get¶
Get the current value of all flags.
Parameters:
grpEvent group.
Returns:
Current flags.
function syn_event_init¶
Initialize an event group.
Parameters:
grpEvent group.
function syn_event_set¶
Set one or more event flags.
Parameters:
grpEvent group.maskBitmask of flags to set.
Macro Definition Documentation¶
define PT_WAIT_EVENT¶
Block the protothread until ALL bits in mask are set, then auto-clear.
define PT_WAIT_EVENT_ANY¶
Block the protothread until ANY bit in mask is set, then auto-clear.
The documentation for this class was generated from the following file src/syntropic/util/syn_event.h