VSF Documented
vsf_simple_task.c File Reference

Macros

#define __VSF_EDA_CLASS_INHERIT__
 

Functions

vsf_evt_t __vsf_delay (vsf_systimer_tick_t tick)
 Low-level delay helper backing the vsf_delay() statement macros.
 
vsf_sync_reason_t __vsf_sem_pend (vsf_sem_t *sem_ptr, vsf_timeout_tick_t time_out)
 Low-level semaphore-pend helper backing the vsf_sem_pend() and vsf_trig_wait() statement macros.
 
vsf_sync_reason_t __vsf_mutex_enter (vsf_mutex_t *mtx_ptr, vsf_timeout_tick_t time_out)
 Low-level mutex-enter helper backing the vsf_mutex_enter() and vsf_crit_enter() statement macros.
 
vsf_evt_t __vsf_yield (void)
 Low-level yield helper backing the vsf_yield() statement macro.
 
vsf_err_t __vsf_call_eda (uintptr_t evthandler, uintptr_t param, size_t local_size, size_t local_buff_size, uintptr_t local_buff)
 Low-level sub-task-call helper backing the vsf_call_eda() and vsf_call_peda() macros.
 
fsm_rt_t __vsf_call_task (vsf_task_entry_t entry, uintptr_t param, size_t local_size)
 Low-level helper for calling a sub task with a return value.
 

Macro Definition Documentation

◆ __VSF_EDA_CLASS_INHERIT__

#define __VSF_EDA_CLASS_INHERIT__

Function Documentation

◆ __vsf_delay()

vsf_evt_t __vsf_delay ( vsf_systimer_tick_t tick)

Low-level delay helper backing the vsf_delay() statement macros.

Parameters
[in]tickdelay time in system timer ticks
Returns
vsf_evt_t: VSF_EVT_TIMER when the delay expires, otherwise VSF_EVT_INVALID while the delay is still pending
Note
Internal use only.

◆ __vsf_sem_pend()

vsf_sync_reason_t __vsf_sem_pend ( vsf_sem_t * sem_ptr,
vsf_timeout_tick_t time_out )

Low-level semaphore-pend helper backing the vsf_sem_pend() and vsf_trig_wait() statement macros.

Parameters
[in]sem_ptrpointer to the semaphore vsf_sem_t
[in]time_outtimeout in system timer ticks; a negative value waits forever
Returns
vsf_sync_reason_t: VSF_SYNC_GET when the semaphore is obtained, VSF_SYNC_TIMEOUT on timeout, VSF_SYNC_CANCEL when the wait is cancelled, VSF_SYNC_FAIL on error, otherwise VSF_SYNC_PENDING while the wait is still in progress
Note
Internal use only.

◆ __vsf_mutex_enter()

vsf_sync_reason_t __vsf_mutex_enter ( vsf_mutex_t * mtx_ptr,
vsf_timeout_tick_t time_out )

Low-level mutex-enter helper backing the vsf_mutex_enter() and vsf_crit_enter() statement macros.

Parameters
[in]mtx_ptrpointer to the mutex vsf_mutex_t
[in]time_outtimeout in system timer ticks; a negative value waits forever
Returns
vsf_sync_reason_t: VSF_SYNC_GET when the mutex is obtained, VSF_SYNC_TIMEOUT on timeout, VSF_SYNC_CANCEL when the wait is cancelled, VSF_SYNC_FAIL on error, otherwise VSF_SYNC_PENDING while the wait is still in progress
Note
Internal use only.

◆ __vsf_yield()

vsf_evt_t __vsf_yield ( void )

Low-level yield helper backing the vsf_yield() statement macro.

Returns
vsf_evt_t: VSF_EVT_YIELD when the task is resumed after the yield, otherwise VSF_EVT_NONE while the yield is still pending
Note
Internal use only.

◆ __vsf_call_eda()

vsf_err_t __vsf_call_eda ( uintptr_t evthandler,
uintptr_t param,
size_t local_size,
size_t local_buff_size,
uintptr_t local_buff )
extern

Low-level sub-task-call helper backing the vsf_call_eda() and vsf_call_peda() macros.

Parameters
[in]evthandlerentry function of the sub task
[in]paramparameter passed to the sub task
[in]local_sizesize of the local variable area of the sub task
[in]local_buff_sizesize of the buffer pointed by local_buff
[in]local_buffbuffer used to initialize the local variable area of the sub task, NULL if not used
Returns
vsf_err_t: VSF_ERR_NONE if the call is started successfully; VSF_ERR_NOT_ENOUGH_RESOURCES if no frame is available
Note
Internal use only.

◆ __vsf_call_task()

fsm_rt_t __vsf_call_task ( vsf_task_entry_t entry,
uintptr_t param,
size_t local_size )

Low-level helper for calling a sub task with a return value.

Parameters
[in]entryentry function of the sub task vsf_task_entry_t
[in]paramparameter passed to the sub task
[in]local_sizesize of the local variable area of the sub task
Returns
fsm_rt_t: return status of the sub task
Note
Internal use only.
Generated from commit: vsfteam/vsf@a5104db