VSF Documented
Macros | Functions
vsf_thread.c File Reference
#include "../vsf_kernel_cfg.h"
#include "../vsf_kernel_common.h"
#include "./vsf_thread.h"
#include "../vsf_os.h"

Macros

#define __VSF_THREAD_CLASS_IMPLEMENT
 
#define __VSF_EDA_CLASS_INHERIT__
 

Functions

vsf_evtq_t__vsf_os_evtq_get (vsf_prio_t priority)
 
vsf_thread_t * vsf_thread_get_cur (void)
 
VSF_CAL_NO_RETURN void vsf_thread_exit (void)
 
void __vsf_eda_return_to_thread (vsf_eda_t *eda)
 
vsf_evt_t vsf_thread_wait (void)
 
void vsf_thread_wait_for_evt (vsf_evt_t evt)
 
uintptr_t vsf_thread_wait_for_evt_msg (vsf_evt_t evt)
 
uintptr_t vsf_thread_wait_for_msg (void)
 
void vsf_thread_sendevt (vsf_thread_t *thread_obj, vsf_evt_t evt)
 
void __vsf_thread_host_thread (void *arg)
 
void vsf_thread_stack_check (void)
 
vsf_err_t vsf_thread_start (vsf_thread_t *pthis, vsf_thread_cb_t *thread_cb, vsf_prio_t priority)
 
vsf_err_t vk_eda_call_thread_prepare (vsf_thread_cb_t *pthis, vsf_thread_prepare_cfg_t *cfg)
 
vsf_err_t vk_eda_call_thread (vsf_thread_cb_t *thread_cb)
 
vsf_err_t vk_thread_call_eda (uintptr_t eda_handler, uintptr_t param, size_t local_size, size_t local_buff_size, uintptr_t local_buff)
 
vsf_err_t vk_thread_call_thread (vsf_thread_cb_t *pthis, vsf_thread_prepare_cfg_t *cfg)
 
fsm_rt_t vk_thread_call_task (vsf_task_entry_t task_handler, uintptr_t param, size_t local_size)
 
void vsf_thread_delay (vsf_systimer_tick_t tick)
 
void vsf_thread_yield (void)
 
vsf_prio_t vsf_thread_set_priority (vsf_prio_t priority)
 
void vsf_thread_signal (vsf_thread_t *thread, int sig)
 
vsf_sync_reason_t __vsf_thread_wait_for_sync (vsf_sync_t *sync, vsf_timeout_tick_t time_out)
 
vsf_err_t vsf_thread_mutex_leave (vsf_mutex_t *mtx)
 
vsf_sync_reason_t vsf_thread_queue_send (vsf_eda_queue_t *queue, void *node, vsf_timeout_tick_t timeout)
 
vsf_sync_reason_t vsf_thread_queue_recv (vsf_eda_queue_t *queue, void **node, vsf_timeout_tick_t timeout)
 
vsf_sync_reason_t vsf_thread_bmpevt_pend (vsf_bmpevt_t *bmpevt, vsf_bmpevt_pender_t *pender, vsf_timeout_tick_t timeout)
 

Macro Definition Documentation

◆ __VSF_THREAD_CLASS_IMPLEMENT

#define __VSF_THREAD_CLASS_IMPLEMENT

◆ __VSF_EDA_CLASS_INHERIT__

#define __VSF_EDA_CLASS_INHERIT__

Function Documentation

◆ __vsf_os_evtq_get()

vsf_evtq_t * __vsf_os_evtq_get ( vsf_prio_t  priority)
extern

◆ vsf_thread_get_cur()

vsf_thread_t * vsf_thread_get_cur ( void  )

◆ vsf_thread_exit()

VSF_CAL_NO_RETURN void vsf_thread_exit ( void  )

◆ __vsf_eda_return_to_thread()

void __vsf_eda_return_to_thread ( vsf_eda_t eda)

◆ vsf_thread_wait()

vsf_evt_t vsf_thread_wait ( void  )

◆ vsf_thread_wait_for_evt()

void vsf_thread_wait_for_evt ( vsf_evt_t  evt)
Note
make sure there is no message ignored

◆ vsf_thread_wait_for_evt_msg()

uintptr_t vsf_thread_wait_for_evt_msg ( vsf_evt_t  evt)

◆ vsf_thread_wait_for_msg()

uintptr_t vsf_thread_wait_for_msg ( void  )

◆ vsf_thread_sendevt()

void vsf_thread_sendevt ( vsf_thread_t *  thread_obj,
vsf_evt_t  evt 
)

◆ __vsf_thread_host_thread()

void __vsf_thread_host_thread ( void *  arg)

◆ vsf_thread_stack_check()

void vsf_thread_stack_check ( void  )

◆ vsf_thread_start()

vsf_err_t vsf_thread_start ( vsf_thread_t *  pthis,
vsf_thread_cb_t *  thread_cb,
vsf_prio_t  priority 
)

◆ vk_eda_call_thread_prepare()

vsf_err_t vk_eda_call_thread_prepare ( vsf_thread_cb_t *  pthis,
vsf_thread_prepare_cfg_t *  cfg 
)

◆ vk_eda_call_thread()

vsf_err_t vk_eda_call_thread ( vsf_thread_cb_t *  thread_cb)

◆ vk_thread_call_eda()

vsf_err_t vk_thread_call_eda ( uintptr_t  eda_handler,
uintptr_t  param,
size_t  local_size,
size_t  local_buff_size,
uintptr_t  local_buff 
)

◆ vk_thread_call_thread()

vsf_err_t vk_thread_call_thread ( vsf_thread_cb_t *  pthis,
vsf_thread_prepare_cfg_t *  cfg 
)

◆ vk_thread_call_task()

fsm_rt_t vk_thread_call_task ( vsf_task_entry_t  task_handler,
uintptr_t  param,
size_t  local_size 
)

◆ vsf_thread_delay()

void vsf_thread_delay ( vsf_systimer_tick_t  tick)

◆ vsf_thread_yield()

void vsf_thread_yield ( void  )

◆ vsf_thread_set_priority()

vsf_prio_t vsf_thread_set_priority ( vsf_prio_t  priority)

◆ vsf_thread_signal()

void vsf_thread_signal ( vsf_thread_t *  thread,
int  sig 
)

◆ __vsf_thread_wait_for_sync()

vsf_sync_reason_t __vsf_thread_wait_for_sync ( vsf_sync_t sync,
vsf_timeout_tick_t  time_out 
)
Note
there is a VSF_ASSERT() in __vsf_eda_sync_get_reason, which ! validated the evt value. Hence, there is no need to assert ! the evt value here.

◆ vsf_thread_mutex_leave()

vsf_err_t vsf_thread_mutex_leave ( vsf_mutex_t mtx)

◆ vsf_thread_queue_send()

vsf_sync_reason_t vsf_thread_queue_send ( vsf_eda_queue_t queue,
void *  node,
vsf_timeout_tick_t  timeout 
)

◆ vsf_thread_queue_recv()

vsf_sync_reason_t vsf_thread_queue_recv ( vsf_eda_queue_t queue,
void **  node,
vsf_timeout_tick_t  timeout 
)

◆ vsf_thread_bmpevt_pend()

vsf_sync_reason_t vsf_thread_bmpevt_pend ( vsf_bmpevt_t bmpevt,
vsf_bmpevt_pender_t pender,
vsf_timeout_tick_t  timeout 
)
Note
there is a VSF_ASSERT() in vsf_eda_bmpevt_poll, which ! validated the evt value. Hence, there is no need to assert ! the evt value here.