|
VSF Documented
|
Go to the source code of this file.
Macros | |
| #define | using_grouped_evt vsf_bmpevt_pender_t pender |
| Declare the grouped-event pender member in the task-local control block; required by the wait_for_* statement macros. | |
| #define | __declare_grouped_evts(__name) |
| #define | declare_grouped_evts(__name) |
| Declare a bitmap-event group type. | |
| #define | __def_grouped_evts(__name) |
| #define | __end_def_grouped_evts(__name) |
| #define | end_def_grouped_evts(__name) |
| End the definition of a bitmap-event group started with def_grouped_evts(). | |
| #define | __def_evt(__name, __evt) |
| #define | def_evt(__name, __evt) |
| Define an event bit of a bitmap-event group. | |
| #define | def_adapter(__name, __evt) |
| Define an event bit of a bitmap-event group that is driven by an adapter. | |
| #define | def_grouped_evts(__name) |
| Begin the definition of a bitmap-event group. | |
| #define | __implement_grouped_evts(__name, ...) |
| #define | implement_grouped_evts(__name, ...) |
| Define the adapter list of a bitmap-event group. | |
| #define | add_sync_adapter(__SYNC, __MSK, ...) |
| Create an adapter entry mapping a sync object (e.g. a semaphore) onto event bits of a bitmap-event group. | |
| #define | __init_grouped_evts(__name, __evt_group, __auto_reset) |
| #define | init_grouped_evts(__name, __evt_group, __auto_reset) |
| Initialize a bitmap-event group instance with its adapter list. | |
| #define | __grouped_evts_info(__name) |
| #define | grouped_evts_info(__name) |
| Get the info symbol of a bitmap-event group. | |
| #define | __grouped_evts_adapter(__name, __INDEX) |
| #define | grouped_evts_adapter(__name, __INDEX) |
| Get an adapter of a bitmap-event group by index. | |
| #define | wait_for_all_timeout(__group, __msk, __timeout) |
| Wait until all event bits of a mask in a bitmap-event group are set (AND), with a timeout in system timer ticks (cooperative, non-blocking for other tasks). | |
| #define | wait_for_all_timeout_ms(__group, __msk, __timeout) |
| Wait until all event bits of a mask in a bitmap-event group are set (AND), with a timeout in milliseconds (cooperative, non-blocking for other tasks). | |
| #define | wait_for_all_timeout_us(__group, __msk, __timeout) |
| Wait until all event bits of a mask in a bitmap-event group are set (AND), with a timeout in microseconds (cooperative, non-blocking for other tasks). | |
| #define | wait_for_all(__group, __msk) |
| Wait until all event bits of a mask in a bitmap-event group are set (AND), waiting forever (cooperative, non-blocking for other tasks). | |
| #define | wait_for_any_timeout(__group, __msk, __timeout) |
| Wait until any event bit of a mask in a bitmap-event group is set (OR), with a timeout in system timer ticks (cooperative, non-blocking for other tasks). | |
| #define | wait_for_any_timeout_ms(__group, __msk, __timeout) |
| Wait until any event bit of a mask in a bitmap-event group is set (OR), with a timeout in milliseconds (cooperative, non-blocking for other tasks). | |
| #define | wait_for_any_timeout_us(__group, __msk, __timeout) |
| Wait until any event bit of a mask in a bitmap-event group is set (OR), with a timeout in microseconds (cooperative, non-blocking for other tasks). | |
| #define | wait_for_any(__group, __msk) |
| Wait until any event bit of a mask in a bitmap-event group is set (OR), waiting forever (cooperative, non-blocking for other tasks). | |
| #define | wait_for_one(__group, __msk) |
| Wait until any event bit of a mask in a bitmap-event group is set (alias of wait_for_any(), OR), waiting forever (cooperative, non-blocking for other tasks). | |
| #define | wait_for_one_timeout(__group, __msk, __timeout) |
| Wait until any event bit of a mask in a bitmap-event group is set (alias of wait_for_any_timeout(), OR), with a timeout in system timer ticks (cooperative, non-blocking for other tasks). | |
| #define | wait_for_one_timeout_ms(__group, __msk, __timeout) |
| Wait until any event bit of a mask in a bitmap-event group is set (alias of wait_for_any_timeout_ms(), OR), with a timeout in milliseconds (cooperative, non-blocking for other tasks). | |
| #define | wait_for_one_timeout_us(__group, __msk, __timeout) |
| Wait until any event bit of a mask in a bitmap-event group is set (alias of wait_for_any_timeout_us(), OR), with a timeout in microseconds (cooperative, non-blocking for other tasks). | |
| #define | reset_grouped_evts(__group, __msk) |
| Reset event bits of a bitmap-event group. | |
| #define | set_grouped_evts(__group, __msk) |
| Set event bits of a bitmap-event group, waking up the tasks waiting for them if any. | |
Functions | |
| void | __vsf_grouped_evts_init (vsf_bmpevt_t *this_ptr, vsf_bmpevt_adapter_t **adapters_pptr, uint_fast8_t adapter_count, uint_fast32_t auto_reset) |
| Low-level initialization helper backing the init_grouped_evts() macro. | |
| vsf_sync_reason_t | __vsf_bmpevt_wait_for (vsf_bmpevt_t *bmpevt_ptr, const vsf_bmpevt_pender_t *pender_ptr, int_fast32_t time_out) |
| Low-level bitmap-event wait helper backing the wait_for_one()/ wait_for_any()/wait_for_all() statement macros. | |
| #define using_grouped_evt vsf_bmpevt_pender_t pender |
Declare the grouped-event pender member in the task-local control block; required by the wait_for_* statement macros.
pender, which the wait_for_one()/wait_for_any()/wait_for_all() macros use through vsf_this. Typically placed inside a features_used()/mem_sharable() block of the task definition. | #define __declare_grouped_evts | ( | __name | ) |
| #define declare_grouped_evts | ( | __name | ) |
Declare a bitmap-event group type.
| [in] | __name | name of the group; a typedef of vsf_bmpevt_t and a forward declaration of the enumeration enum_of_<__name> are generated |
| #define __def_grouped_evts | ( | __name | ) |
| #define __end_def_grouped_evts | ( | __name | ) |
| #define end_def_grouped_evts | ( | __name | ) |
End the definition of a bitmap-event group started with def_grouped_evts().
| [in] | __name | name of the group; also generates the enumerator all_evts_msk_of_<__name> covering all defined event bits |
| #define __def_evt | ( | __name, | |
| __evt ) |
| #define def_evt | ( | __name, | |
| __evt ) |
Define an event bit of a bitmap-event group.
| [in] | __name | name of the group |
| [in] | __evt | name of the event bit; generates the enumerators <__evt>_idx (bit index) and <__evt>_msk (bit mask) |
| #define def_adapter | ( | __name, | |
| __evt ) |
Define an event bit of a bitmap-event group that is driven by an adapter.
| [in] | __name | name of the group |
| [in] | __evt | name of the event bit; generates the enumerators <__evt>_idx (bit index) and <__evt>_msk (bit mask) |
| #define def_grouped_evts | ( | __name | ) |
Begin the definition of a bitmap-event group.
| [in] | __name | name of the group previously declared with declare_grouped_evts() |
| #define __implement_grouped_evts | ( | __name, | |
| ... ) |
| #define implement_grouped_evts | ( | __name, | |
| ... ) |
Define the adapter list of a bitmap-event group.
| [in] | __name | name of the group |
| [in] | ... | adapter entries, typically created with add_sync_adapter() |
| #define add_sync_adapter | ( | __SYNC, | |
| __MSK, | |||
| ... ) |
Create an adapter entry mapping a sync object (e.g. a semaphore) onto event bits of a bitmap-event group.
| [in] | __SYNC | pointer to the sync object vsf_sync_t (e.g. vsf_sem_t) |
| [in] | __MSK | mask of the event bits driven by this sync object |
| [in] | ... | optional additional initializers for vsf_bmpevt_adapter_sync_t |
| #define __init_grouped_evts | ( | __name, | |
| __evt_group, | |||
| __auto_reset ) |
| #define init_grouped_evts | ( | __name, | |
| __evt_group, | |||
| __auto_reset ) |
Initialize a bitmap-event group instance with its adapter list.
| [in] | __name | name of the group (selects the adapter list defined by implement_grouped_evts()) |
| [in] | __evt_group | pointer to the group instance vsf_bmpevt_t |
| [in] | __auto_reset | mask of the event bits that are reset automatically after a successful wait |
| #define grouped_evts_info | ( | __name | ) |
Get the info symbol of a bitmap-event group.
| [in] | __name | name of the group |
| #define grouped_evts_adapter | ( | __name, | |
| __INDEX ) |
Get an adapter of a bitmap-event group by index.
| [in] | __name | name of the group |
| [in] | __INDEX | index of the adapter in the list defined by implement_grouped_evts() |
| #define wait_for_all_timeout | ( | __group, | |
| __msk, | |||
| __timeout ) |
Wait until all event bits of a mask in a bitmap-event group are set (AND), with a timeout in system timer ticks (cooperative, non-blocking for other tasks).
| [in] | __group | pointer to the group instance vsf_bmpevt_t |
| [in] | __msk | mask of the event bits to wait for |
| [in] | __timeout | timeout in system timer ticks; a negative value waits forever |
| #define wait_for_all_timeout_ms | ( | __group, | |
| __msk, | |||
| __timeout ) |
Wait until all event bits of a mask in a bitmap-event group are set (AND), with a timeout in milliseconds (cooperative, non-blocking for other tasks).
| [in] | __group | pointer to the group instance vsf_bmpevt_t |
| [in] | __msk | mask of the event bits to wait for |
| [in] | __timeout | timeout in milliseconds, converted to ticks via vsf_systimer_ms_to_tick() |
| #define wait_for_all_timeout_us | ( | __group, | |
| __msk, | |||
| __timeout ) |
Wait until all event bits of a mask in a bitmap-event group are set (AND), with a timeout in microseconds (cooperative, non-blocking for other tasks).
| [in] | __group | pointer to the group instance vsf_bmpevt_t |
| [in] | __msk | mask of the event bits to wait for |
| [in] | __timeout | timeout in microseconds, converted to ticks via vsf_systimer_us_to_tick() |
| #define wait_for_all | ( | __group, | |
| __msk ) |
Wait until all event bits of a mask in a bitmap-event group are set (AND), waiting forever (cooperative, non-blocking for other tasks).
| [in] | __group | pointer to the group instance vsf_bmpevt_t |
| [in] | __msk | mask of the event bits to wait for |
| #define wait_for_any_timeout | ( | __group, | |
| __msk, | |||
| __timeout ) |
Wait until any event bit of a mask in a bitmap-event group is set (OR), with a timeout in system timer ticks (cooperative, non-blocking for other tasks).
| [in] | __group | pointer to the group instance vsf_bmpevt_t |
| [in] | __msk | mask of the event bits to wait for |
| [in] | __timeout | timeout in system timer ticks; a negative value waits forever |
| #define wait_for_any_timeout_ms | ( | __group, | |
| __msk, | |||
| __timeout ) |
Wait until any event bit of a mask in a bitmap-event group is set (OR), with a timeout in milliseconds (cooperative, non-blocking for other tasks).
| [in] | __group | pointer to the group instance vsf_bmpevt_t |
| [in] | __msk | mask of the event bits to wait for |
| [in] | __timeout | timeout in milliseconds, converted to ticks via vsf_systimer_ms_to_tick() |
| #define wait_for_any_timeout_us | ( | __group, | |
| __msk, | |||
| __timeout ) |
Wait until any event bit of a mask in a bitmap-event group is set (OR), with a timeout in microseconds (cooperative, non-blocking for other tasks).
| [in] | __group | pointer to the group instance vsf_bmpevt_t |
| [in] | __msk | mask of the event bits to wait for |
| [in] | __timeout | timeout in microseconds, converted to ticks via vsf_systimer_us_to_tick() |
| #define wait_for_any | ( | __group, | |
| __msk ) |
Wait until any event bit of a mask in a bitmap-event group is set (OR), waiting forever (cooperative, non-blocking for other tasks).
| [in] | __group | pointer to the group instance vsf_bmpevt_t |
| [in] | __msk | mask of the event bits to wait for |
| #define wait_for_one | ( | __group, | |
| __msk ) |
Wait until any event bit of a mask in a bitmap-event group is set (alias of wait_for_any(), OR), waiting forever (cooperative, non-blocking for other tasks).
| [in] | __group | pointer to the group instance vsf_bmpevt_t |
| [in] | __msk | mask of the event bits to wait for |
| #define wait_for_one_timeout | ( | __group, | |
| __msk, | |||
| __timeout ) |
Wait until any event bit of a mask in a bitmap-event group is set (alias of wait_for_any_timeout(), OR), with a timeout in system timer ticks (cooperative, non-blocking for other tasks).
| [in] | __group | pointer to the group instance vsf_bmpevt_t |
| [in] | __msk | mask of the event bits to wait for |
| [in] | __timeout | timeout in system timer ticks; a negative value waits forever |
| #define wait_for_one_timeout_ms | ( | __group, | |
| __msk, | |||
| __timeout ) |
Wait until any event bit of a mask in a bitmap-event group is set (alias of wait_for_any_timeout_ms(), OR), with a timeout in milliseconds (cooperative, non-blocking for other tasks).
| [in] | __group | pointer to the group instance vsf_bmpevt_t |
| [in] | __msk | mask of the event bits to wait for |
| [in] | __timeout | timeout in milliseconds, converted to ticks via vsf_systimer_ms_to_tick() |
| #define wait_for_one_timeout_us | ( | __group, | |
| __msk, | |||
| __timeout ) |
Wait until any event bit of a mask in a bitmap-event group is set (alias of wait_for_any_timeout_us(), OR), with a timeout in microseconds (cooperative, non-blocking for other tasks).
| [in] | __group | pointer to the group instance vsf_bmpevt_t |
| [in] | __msk | mask of the event bits to wait for |
| [in] | __timeout | timeout in microseconds, converted to ticks via vsf_systimer_us_to_tick() |
| #define reset_grouped_evts | ( | __group, | |
| __msk ) |
Reset event bits of a bitmap-event group.
| [in] | __group | pointer to the group instance vsf_bmpevt_t |
| [in] | __msk | mask of the event bits to reset |
| #define set_grouped_evts | ( | __group, | |
| __msk ) |
Set event bits of a bitmap-event group, waking up the tasks waiting for them if any.
| [in] | __group | pointer to the group instance vsf_bmpevt_t |
| [in] | __msk | mask of the event bits to set |
|
extern |
Low-level initialization helper backing the init_grouped_evts() macro.
| [in] | this_ptr | pointer to the group instance vsf_bmpevt_t |
| [in] | adapters_pptr | pointer to the adapter list defined by implement_grouped_evts() |
| [in] | adapter_count | number of adapters in the list |
| [in] | auto_reset | mask of the event bits that are reset automatically after a successful wait |
|
extern |
Low-level bitmap-event wait helper backing the wait_for_one()/ wait_for_any()/wait_for_all() statement macros.
| [in] | bmpevt_ptr | pointer to the group instance vsf_bmpevt_t |
| [in] | pender_ptr | pointer to the pender vsf_bmpevt_pender_t holding the mask and the operation (VSF_BMPEVT_AND/VSF_BMPEVT_OR) |
| [in] | time_out | timeout in system timer ticks; a negative value waits forever |