|
VSF Documented
|
#include "kernel/vsf_kernel_cfg.h"#include "./vsf_evtq.h"#include "./task/vsf_task.h"#include "hal/arch/vsf_arch.h"Go to the source code of this file.
Data Structures | |
| struct | __vsf_eda_frame_buffer_t |
| struct | vsf_kernel_resource_t |
Macros | |
| #define | VSF_USER_ENTRY user_main |
| User application entry point symbol. If not defined externally, it defaults to user_main when the kernel entry is configured as main, otherwise it defaults to main. | |
| #define | VSF_SCHED_SAFE_CODE_REGION DEFAULT_CODE_REGION_NONE |
| Empty stub variant when VSF_OS_CFG_PRIORITY_NUM <= 1; shares the documentation of the first variant above. | |
| #define | vsf_sched_lock() |
| No-op stub variant when VSF_OS_CFG_PRIORITY_NUM <= 1; shares the documentation of the first variant above. | |
| #define | vsf_sched_unlock(__level) |
| No-op stub variant when VSF_OS_CFG_PRIORITY_NUM <= 1; shares the documentation of the first variant above. | |
| #define | vsf_sched_safe() |
| Stub variant when VSF_OS_CFG_PRIORITY_NUM <= 1 (the following block always runs); shares the documentation of the first variant above. | |
| #define | __vsf_sched_safe(__code) |
| No-op stub variant when VSF_OS_CFG_PRIORITY_NUM <= 1; shares the documentation of the first variant above. | |
| #define | vsf_sched_safe_exit() |
| No-op stub variant when VSF_OS_CFG_PRIORITY_NUM <= 1; shares the documentation of the first variant above. | |
| #define | vsf_protect_scheduler() |
| Lock the scheduler, alias of vsf_sched_lock() | |
| #define | vsf_unprotect_scheduler(__state) |
| Unlock the scheduler, alias of vsf_sched_unlock() | |
| #define | vsf_protect_sched() |
| Lock the scheduler and return the previous status as vsf_protect_t. | |
| #define | vsf_unprotect_sched(__prot) |
| Restore the scheduler lock status saved by vsf_protect_sched() | |
| #define | __vsf_kernel_host_request_init(__req) |
| Initialize a host IRQ request. | |
| #define | __vsf_kernel_host_request_fini(__req) |
| Finalize a host IRQ request. | |
| #define | __vsf_kernel_host_request_send(__req) |
| Send (trigger) a host IRQ request. | |
| #define | __vsf_kernel_host_request_pend(__req) |
| Pend (wait) on a host IRQ request. | |
| #define | __vsf_kernel_host_thread_init(__thread, __name, __entry, __prio, __stack, __stacksize) |
| Initialize a host IRQ thread. | |
| #define | __vsf_kernel_host_thread_restart(__thread, __request_pending) |
| Restart a host IRQ thread. | |
| #define | __vsf_kernel_host_thread_exit(__thread) |
| Exit a host IRQ thread. | |
| #define | vsf_sleep(...) |
| Put the CPU into sleep (low-power) mode; an optional sleep level (architecture-specific, 0 by default) may be passed. | |
| #define | vsf_protect_region_sched vsf_protect_region_none |
Typedefs | |
| typedef vsf_arch_prio_t | vsf_sched_lock_status_t |
| Scheduler lock status, returned by vsf_sched_lock() / vsf_forced_sched_lock() and passed back to vsf_sched_unlock() / vsf_forced_sched_unlock() | |
| typedef vsf_evt_node_t struct __vsf_eda_frame_buffer_t | __vsf_eda_frame_buffer_t |
| typedef __vsf_eda_frame_buffer_t struct vsf_kernel_resource_t | vsf_kernel_resource_t |
Functions | |
| dcl_vsf_pool (vsf_evt_node_pool) def_vsf_pool(vsf_evt_node_pool | |
| dcl_vsf_pool (vsf_eda_frame_pool) def_vsf_pool(vsf_eda_frame_pool | |
| void | __vsf_kernel_os_start (void) |
| __vsf_kernel_os_start and __vsf_kernel_os_run_priority are ONLY used when embedded weak vsf_main_entry is not used | |
| void | __vsf_kernel_os_run_priority (vsf_prio_t priority) |
| Run the event queue of the given priority (dispatch pending events) | |
| void | vsf_kernel_err_report (enum vsf_kernel_error_t err) |
| Report a kernel error. | |
| void | vsf_cpu_usage_start (vsf_cpu_usage_ctx_t *ctx) |
| Start CPU usage measurement. | |
| void | vsf_cpu_usage_stop (void) |
| Stop CPU usage measurement. | |
| void | __vsf_sleep (int level) |
| Implementation of vsf_sleep(), put the CPU into sleep (low-power) mode. | |
| #define VSF_USER_ENTRY user_main |
User application entry point symbol. If not defined externally, it defaults to user_main when the kernel entry is configured as main, otherwise it defaults to main.
| #define VSF_SCHED_SAFE_CODE_REGION DEFAULT_CODE_REGION_NONE |
Empty stub variant when VSF_OS_CFG_PRIORITY_NUM <= 1; shares the documentation of the first variant above.
| #define vsf_sched_lock | ( | ) |
No-op stub variant when VSF_OS_CFG_PRIORITY_NUM <= 1; shares the documentation of the first variant above.
| #define vsf_sched_unlock | ( | __level | ) |
No-op stub variant when VSF_OS_CFG_PRIORITY_NUM <= 1; shares the documentation of the first variant above.
| #define vsf_sched_safe | ( | ) |
Stub variant when VSF_OS_CFG_PRIORITY_NUM <= 1 (the following block always runs); shares the documentation of the first variant above.
| #define __vsf_sched_safe | ( | __code | ) |
No-op stub variant when VSF_OS_CFG_PRIORITY_NUM <= 1; shares the documentation of the first variant above.
| #define vsf_sched_safe_exit | ( | ) |
No-op stub variant when VSF_OS_CFG_PRIORITY_NUM <= 1; shares the documentation of the first variant above.
| #define vsf_protect_scheduler | ( | ) |
Lock the scheduler, alias of vsf_sched_lock()
| #define vsf_unprotect_scheduler | ( | __state | ) |
Unlock the scheduler, alias of vsf_sched_unlock()
| [in] | __state | the lock status returned by vsf_protect_scheduler() |
| #define vsf_protect_sched | ( | ) |
Lock the scheduler and return the previous status as vsf_protect_t.
| #define vsf_unprotect_sched | ( | __prot | ) |
Restore the scheduler lock status saved by vsf_protect_sched()
| [in] | __prot | the status returned by vsf_protect_sched() |
| #define __vsf_kernel_host_request_init | ( | __req | ) |
Initialize a host IRQ request.
| [in] | __req | pointer to the host IRQ request |
| #define __vsf_kernel_host_request_fini | ( | __req | ) |
Finalize a host IRQ request.
| [in] | __req | pointer to the host IRQ request |
| #define __vsf_kernel_host_request_send | ( | __req | ) |
Send (trigger) a host IRQ request.
| [in] | __req | pointer to the host IRQ request |
| #define __vsf_kernel_host_request_pend | ( | __req | ) |
Pend (wait) on a host IRQ request.
| [in] | __req | pointer to the host IRQ request |
| #define __vsf_kernel_host_thread_init | ( | __thread, | |
| __name, | |||
| __entry, | |||
| __prio, | |||
| __stack, | |||
| __stacksize ) |
Initialize a host IRQ thread.
| [in] | __thread | pointer to the host thread |
| [in] | __name | name of the thread |
| [in] | __entry | entry function of the thread |
| [in] | __prio | priority of the thread |
| [in] | __stack | ignored when the arch does not support user-provided stack |
| [in] | __stacksize | ignored when the arch does not support user-provided stack |
| #define __vsf_kernel_host_thread_restart | ( | __thread, | |
| __request_pending ) |
Restart a host IRQ thread.
| [in] | __thread | pointer to the host thread |
| [in] | __request_pending | pointer to the thread request vsf_arch_irq_request_t pended on after restart |
| #define __vsf_kernel_host_thread_exit | ( | __thread | ) |
Exit a host IRQ thread.
| [in] | __thread | pointer to the host thread |
| #define vsf_sleep | ( | ... | ) |
Put the CPU into sleep (low-power) mode; an optional sleep level (architecture-specific, 0 by default) may be passed.
| #define vsf_protect_region_sched vsf_protect_region_none |
Scheduler lock status, returned by vsf_sched_lock() / vsf_forced_sched_lock() and passed back to vsf_sched_unlock() / vsf_forced_sched_unlock()
| typedef vsf_evt_node_t struct __vsf_eda_frame_buffer_t __vsf_eda_frame_buffer_t |
| typedef __vsf_eda_frame_buffer_t struct vsf_kernel_resource_t vsf_kernel_resource_t |
| dcl_vsf_pool | ( | vsf_evt_node_pool | ) |
| dcl_vsf_pool | ( | vsf_eda_frame_pool | ) |
|
extern |
__vsf_kernel_os_start and __vsf_kernel_os_run_priority are ONLY used when embedded weak vsf_main_entry is not used
Initialize and start the VSF kernel (arch, HAL, service and OS initialization)
|
extern |
Run the event queue of the given priority (dispatch pending events)
| [in] | priority | the priority whose event queue is handled |
|
extern |
Report a kernel error.
| [in] | err | the kernel error of type vsf_kernel_error_t |
You start task, e.g. eda, vsf_task, vsf_pt or vsf_thread in the idle task. Please use vsf_prio_0 when you do this in idle task.
|
extern |
Start CPU usage measurement.
| [in] | ctx | a pointer to structure vsf_cpu_usage_ctx_t storing the measurement result |
|
extern |
Stop CPU usage measurement.
|
extern |
Implementation of vsf_sleep(), put the CPU into sleep (low-power) mode.
| [in] | level | sleep level, architecture-specific |