VSF Documented
vsf_evtq_list.c File Reference
#include "kernel/vsf_kernel_cfg.h"
#include "./vsf_kernel_common.h"
#include "./vsf_eda.h"
#include "./vsf_evtq.h"
#include "./vsf_os.h"
#include "./vsf_timq.h"

Macros

#define __VSF_EDA_CLASS_IMPLEMENT
 

Functions

vsf_evtq_t__vsf_os_evtq_get (vsf_prio_t priority)
 
vsf_err_t __vsf_os_evtq_set_priority (vsf_evtq_t *pthis, vsf_prio_t priority)
 
vsf_err_t __vsf_os_evtq_activate (vsf_evtq_t *pthis)
 
vsf_err_t __vsf_os_evtq_init (vsf_evtq_t *pthis)
 
vsf_prio_t __vsf_os_evtq_get_priority (vsf_evtq_t *pthis)
 
vsf_evt_node_t__vsf_os_alloc_evt_node (void)
 
void __vsf_os_free_evt_node (vsf_evt_node_t *node)
 
vsf_prio_t __vsf_eda_get_cur_priority (vsf_eda_t *pthis)
 
vsf_err_t __vsf_eda_set_priority (vsf_eda_t *pthis, vsf_prio_t priority)
 
void vsf_evtq_on_eda_init (vsf_eda_t *pthis)
 Event queue hook called when an eda is initialized.
 
void vsf_evtq_on_eda_fini (vsf_eda_t *pthis)
 Event queue hook called when an eda is finalized.
 
vsf_err_t vsf_evtq_init (vsf_evtq_t *pthis)
 Initialize an event queue.
 
vsf_err_t vsf_evtq_post_evt_ex (vsf_eda_t *pthis, vsf_evt_t evt, bool force)
 Post an event to the event queue of the target eda, with force control.
 
vsf_err_t vsf_evtq_post_evt (vsf_eda_t *pthis, vsf_evt_t evt)
 Post an event to the event queue of the target eda.
 
vsf_err_t vsf_evtq_post_msg (vsf_eda_t *pthis, void *msg)
 Post a message to the event queue of the target eda (event VSF_EVT_MESSAGE)
 
vsf_err_t vsf_evtq_post_evt_msg (vsf_eda_t *pthis, vsf_evt_t evt, void *msg)
 Post an event with a message to the event queue of the target eda.
 
bool vsf_evtq_is_empty (vsf_evtq_t *pthis)
 Check whether an event queue is empty.
 
void vsf_evtq_clean_evt (vsf_evt_t evt)
 Clean the pending event(s) posted to the current eda.
 
vsf_err_t vsf_evtq_poll (vsf_evtq_t *pthis)
 Poll an event queue and dispatch the pending events to their edas.
 

Macro Definition Documentation

◆ __VSF_EDA_CLASS_IMPLEMENT

#define __VSF_EDA_CLASS_IMPLEMENT

Function Documentation

◆ __vsf_os_evtq_get()

vsf_evtq_t * __vsf_os_evtq_get ( vsf_prio_t priority)
extern

◆ __vsf_os_evtq_set_priority()

vsf_err_t __vsf_os_evtq_set_priority ( vsf_evtq_t * pthis,
vsf_prio_t priority )
extern

◆ __vsf_os_evtq_activate()

vsf_err_t __vsf_os_evtq_activate ( vsf_evtq_t * pthis)
extern

◆ __vsf_os_evtq_init()

vsf_err_t __vsf_os_evtq_init ( vsf_evtq_t * pthis)
extern

◆ __vsf_os_evtq_get_priority()

vsf_prio_t __vsf_os_evtq_get_priority ( vsf_evtq_t * pthis)
extern

◆ __vsf_os_alloc_evt_node()

vsf_evt_node_t * __vsf_os_alloc_evt_node ( void )
extern

◆ __vsf_os_free_evt_node()

void __vsf_os_free_evt_node ( vsf_evt_node_t * node)
extern

◆ __vsf_eda_get_cur_priority()

vsf_prio_t __vsf_eda_get_cur_priority ( vsf_eda_t * pthis)

◆ __vsf_eda_set_priority()

vsf_err_t __vsf_eda_set_priority ( vsf_eda_t * pthis,
vsf_prio_t priority )

◆ vsf_evtq_on_eda_init()

void vsf_evtq_on_eda_init ( vsf_eda_t * eda)

Event queue hook called when an eda is initialized.

Parameters
[in]edaa 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()

void vsf_evtq_on_eda_fini ( vsf_eda_t * eda)

Event queue hook called when an eda is finalized.

Parameters
[in]edaa 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_init()

vsf_err_t vsf_evtq_init ( vsf_evtq_t * this_ptr)

Initialize an event queue.

Parameters
[in]this_ptra pointer to structure vsf_evtq_t
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_ex()

vsf_err_t vsf_evtq_post_evt_ex ( vsf_eda_t * eda,
vsf_evt_t evt,
bool force )

Post an event to the event queue of the target eda, with force control.

Parameters
[in]edaa pointer to the target vsf_eda_t
[in]evtthe event to post
[in]forcetrue 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()

vsf_err_t vsf_evtq_post_evt ( vsf_eda_t * eda,
vsf_evt_t evt )

Post an event to the event queue of the target eda.

Parameters
[in]edaa pointer to the target vsf_eda_t
[in]evtthe 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()

vsf_err_t vsf_evtq_post_msg ( vsf_eda_t * eda,
void * msg )

Post a message to the event queue of the target eda (event VSF_EVT_MESSAGE)

Parameters
[in]edaa pointer to the target vsf_eda_t
[in]msgthe 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.

◆ vsf_evtq_post_evt_msg()

vsf_err_t vsf_evtq_post_evt_msg ( vsf_eda_t * eda,
vsf_evt_t evt,
void * msg )

Post an event with a message to the event queue of the target eda.

Parameters
[in]edaa pointer to the target vsf_eda_t
[in]evtthe event to post
[in]msgthe 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()

bool vsf_evtq_is_empty ( vsf_evtq_t * this_ptr)

Check whether an event queue is empty.

Parameters
[in]this_ptra pointer to structure vsf_evtq_t
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_clean_evt()

void vsf_evtq_clean_evt ( vsf_evt_t evt)

Clean the pending event(s) posted to the current eda.

Parameters
[in]evtthe 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_poll()

vsf_err_t vsf_evtq_poll ( vsf_evtq_t * this_ptr)

Poll an event queue and dispatch the pending events to their edas.

Parameters
[in]this_ptra pointer to structure vsf_evtq_t
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.
Generated from commit: vsfteam/vsf@a5104db