Go to the source code of this file.
◆ vsf_evtq_ctx_t
| typedef struct vsf_evtq_ctx_t vsf_evtq_ctx_t |
◆ vsf_evt_node_t
| typedef struct vsf_evt_node_t vsf_evt_node_t |
◆ vsf_evtq_t
| typedef struct vsf_evtq_t vsf_evtq_t |
◆ vsf_evtq_init()
Initialize an event queue.
- Parameters
-
- Returns
- vsf_err_t: always VSF_ERR_NONE
- Note
- Kernel-internal API, called during kernel startup; applications do not call it directly.
◆ vsf_evtq_post_evt_msg()
Post an event with a message to the event queue of the target eda.
- Parameters
-
| [in] | eda | a pointer to the target vsf_eda_t |
| [in] | evt | the event to post |
| [in] | msg | the message pointer carried with the event |
- Returns
- vsf_err_t: VSF_ERR_NONE if posted successfully; VSF_ERR_FAIL if the eda is limited and already has a pending event; VSF_ERR_NOT_ENOUGH_RESOURCES if the event queue is full
- Note
- Can be called in task or interrupt context.
◆ vsf_evtq_is_empty()
Check whether an event queue is empty.
- Parameters
-
- Returns
- bool: true if the event queue is empty, false otherwise
- Note
- Kernel-internal API used by the kernel event queues; applications normally use vsf_eda_post_evt()/vsf_eda_post_msg() instead.
◆ vsf_evtq_poll()
Poll an event queue and dispatch the pending events to their edas.
- Parameters
-
- Returns
- vsf_err_t: VSF_ERR_NONE
- Note
- Kernel-internal API used in event-queue (SWI) context; applications normally use vsf_eda_post_evt()/vsf_eda_post_msg() instead.
◆ vsf_evtq_clean_evt()
Clean the pending event(s) posted to the current eda.
- Parameters
-
| [in] | evt | the event to clean; VSF_EVT_NONE cleans all pending events of the current eda |
- Returns
- none
- Note
- Kernel-internal API, called in the current eda task context; applications normally use vsf_eda_post_evt()/vsf_eda_post_msg() instead.
◆ vsf_evtq_on_eda_init()
Event queue hook called when an eda is initialized.
- Parameters
-
| [in] | eda | a pointer to the vsf_eda_t being initialized |
- Returns
- none
- Note
- Kernel-internal hook, invoked by the kernel in task context when an eda is initialized; applications do not call it directly.
◆ vsf_evtq_on_eda_fini()
Event queue hook called when an eda is finalized.
- Parameters
-
| [in] | eda | a pointer to the vsf_eda_t being finalized |
- Returns
- none
- Note
- Kernel-internal hook, invoked by the kernel in task context when an eda is terminated; applications do not call it directly.
◆ vsf_evtq_post_evt_ex()
Post an event to the event queue of the target eda, with force control.
- Parameters
-
| [in] | eda | a pointer to the target vsf_eda_t |
| [in] | evt | the event to post |
| [in] | force | true to post even if the eda is limited and already has a pending event |
- Returns
- vsf_err_t: VSF_ERR_NONE if posted successfully; VSF_ERR_FAIL if the eda is limited and already has a pending event while force is false; VSF_ERR_NOT_ENOUGH_RESOURCES if the event queue is full
- Note
- Can be called in task or interrupt context.
◆ vsf_evtq_post_evt()
Post an event to the event queue of the target eda.
- Parameters
-
| [in] | eda | a pointer to the target vsf_eda_t |
| [in] | evt | the event to post |
- Returns
- vsf_err_t: VSF_ERR_NONE if posted successfully; VSF_ERR_FAIL if the eda is limited and already has a pending event; VSF_ERR_NOT_ENOUGH_RESOURCES if the event queue is full
- Note
- Can be called in task or interrupt context.
◆ vsf_evtq_post_msg()
Post a message to the event queue of the target eda (event VSF_EVT_MESSAGE)
- Parameters
-
| [in] | eda | a pointer to the target vsf_eda_t |
| [in] | msg | the message pointer to post |
- Returns
- vsf_err_t: VSF_ERR_NONE if posted successfully; VSF_ERR_FAIL if the eda is limited and already has a pending event; VSF_ERR_NOT_ENOUGH_RESOURCES if the event queue is full
- Note
- Can be called in task or interrupt context.