24#if VSF_USE_KERNEL == ENABLED
39# if VSF_KERNEL_CFG_ENTRY_IS_MAIN == ENABLED
40# define VSF_USER_ENTRY user_main
42# define VSF_USER_ENTRY main
46#if VSF_OS_CFG_PRIORITY_NUM > 1
48# define VSF_SCHED_SAFE_CODE_REGION VSF_FORCED_SCHED_SAFE_CODE_REGION
49# define __vsf_sched_safe(...) __vsf_forced_sched_safe(__VA_ARGS__)
51# define vsf_sched_lock() vsf_forced_sched_lock()
52# define vsf_sched_unlock(__level) vsf_forced_sched_unlock((vsf_sched_lock_status_t)(__level))
53# define vsf_sched_safe() vsf_forced_sched_safe()
54# define vsf_sched_safe_exit() vsf_forced_sched_safe_exit()
58# define VSF_SCHED_SAFE_CODE_REGION DEFAULT_CODE_REGION_NONE
59# define vsf_sched_lock() 0
60# define vsf_sched_unlock(__level) VSF_UNUSED_PARAM(__level)
61# define vsf_sched_safe() if (1)
62# if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L
63# define __vsf_sched_safe(__code) __code
65# define __vsf_sched_safe(...) __VA_ARGS__
67# define vsf_sched_safe_exit()
71#define vsf_protect_scheduler() vsf_sched_lock()
72#define vsf_unprotect_scheduler(__state) vsf_sched_unlock((__state))
76#if __VSF_OS_SWI_NUM > 0
77#define __vsf_forced_sched_safe(...) \
79 vsf_sched_lock_status_t VSF_MACRO_SAFE_NAME(status) = vsf_forced_sched_lock();\
81 vsf_forced_sched_unlock(VSF_MACRO_SAFE_NAME(status)); \
84#define vsf_forced_sched_safe() vsf_protect_region(&vsf_protect_region_sched)
85#define vsf_forced_sched_safe_exit() vsf_forced_sched_unlock(VSF_MACRO_SAFE_NAME(status))
88#define vsf_protect_sched() (vsf_protect_t)vsf_protect_scheduler()
89#define vsf_unprotect_sched(__prot) vsf_unprotect_scheduler(__prot)
92#if VSF_KERNEL_THREAD_USE_HOST == ENABLED
93# ifdef VSF_ARCH_IRQ_REQUEST_SUPPORT_MANUAL_RESET
94# define __vsf_kernel_host_request_init(__req) __vsf_arch_irq_request_init((__req), true)
96# define __vsf_kernel_host_request_init(__req) __vsf_arch_irq_request_init(__req)
98# define __vsf_kernel_host_request_fini(__req) __vsf_arch_irq_request_fini(__req)
99# define __vsf_kernel_host_request_send(__req) __vsf_arch_irq_request_send(__req)
100# define __vsf_kernel_host_request_pend(__req) __vsf_arch_irq_request_pend(__req)
102# ifdef VSF_ARCH_IRQ_SUPPORT_STACK
103# define __vsf_kernel_host_thread_init(__thread, __name, __entry, __prio, __stack, __stacksize)\
104 __vsf_arch_irq_init(__thread, __name, __entry, __prio, __stack, __stacksize)
106# define __vsf_kernel_host_thread_init(__thread, __name, __entry, __prio, __stack, __stacksize)\
107 __vsf_arch_irq_init(__thread, __name, __entry, __prio)
110# define __vsf_kernel_host_thread_restart(__thread, __request_pending) \
111 __vsf_arch_irq_restart((__thread), (__request_pending))
112# define __vsf_kernel_host_thread_exit(__thread) __vsf_arch_irq_exit(__thread)
118#define vsf_sleep(...) __vsf_sleep((0, ##__VA_ARGS__))
124#ifdef __VSF_OS_CFG_EVTQ_LIST
129#if __VSF_KERNEL_CFG_EDA_FRAME_POOL == ENABLED
140 #if __VSF_OS_SWI_NUM > 0
155#if __VSF_KERNEL_CFG_EVTQ_EN == ENABLED
158# if defined(__VSF_OS_CFG_EVTQ_ARRAY)
162# if defined(__VSF_OS_CFG_EVTQ_LIST)
171#if __VSF_KERNEL_CFG_EDA_FRAME_POOL == ENABLED
181#if __VSF_OS_SWI_NUM > 0
185# define vsf_protect_region_sched vsf_protect_region_none
193#ifndef WEAK_VSF_KERNEL_ERR_REPORT
197#if VSF_KERNEL_CFG_CPU_USAGE == ENABLED
202#if __VSF_OS_SWI_NUM > 0
vsf_arch_prio_t
Definition cortex_a_generic.h:88
unsigned short uint16_t
Definition lvgl.h:41
unsigned char uint8_t
Definition lvgl.h:40
uint8_t extra[VSF_OS_CFG_EDA_FRAME_POOL_EXTRA_SIZE]
Definition vsf_os.h:132
__vsf_eda_frame_t frame
Definition vsf_os.h:131
Definition code_region.h:268
struct vsf_kernel_resource_t::@739 frame_stack
struct vsf_kernel_resource_t::@737::@740 sched_prio
struct vsf_kernel_resource_t::@737 arch
vsf_evtq_t * queue_array
Definition vsf_os.h:157
struct vsf_kernel_resource_t::@738 evt_queue
uint16_t node_cnt
Definition vsf_os.h:164
uint16_t queue_cnt
Definition vsf_os.h:167
uint16_t frame_cnt
Definition vsf_os.h:174
vsf_prio_t highest
Definition vsf_os.h:149
Definition vsf_arch_abstraction.h:54
vsf_kernel_error_t
Definition vsf_eda.h:1083
vsf_prio_t
Definition vsf_kernel_common.h:37
void vsf_cpu_usage_start(vsf_cpu_usage_ctx_t *ctx)
Definition vsf_os.c:531
void __vsf_kernel_os_start(void)
__vsf_kernel_os_start and __vsf_kernel_os_run_priority are ONLY used when embedded weak vsf_main_entr...
Definition vsf_os.c:611
#define vsf_protect_region_sched
Definition vsf_os.h:185
vsf_arch_prio_t vsf_sched_lock_status_t
Definition vsf_os.h:122
void vsf_cpu_usage_stop(void)
Definition vsf_os.c:541
void __vsf_sleep(int level)
Definition vsf_os.c:486
void __vsf_kernel_os_run_priority(vsf_prio_t priority)
Definition vsf_os.c:594
void vsf_kernel_err_report(enum vsf_kernel_error_t err)
Definition vsf_eda.c:409
#define vsf_pool_item(__name)
Definition vsf_pool.h:259
#define dcl_vsf_pool(__name)
Definition vsf_pool.h:264
#define def_vsf_pool(__name, __type)
Definition vsf_pool.h:271