|
VSF Documented
|
Go to the source code of this file.
Macros | |
| #define | __implement_vsf_pt(__name) |
| #define | __implement_vsf_pt_ex(__name, __func_name) |
| #define | __vsf_pt_state() |
| #define | __vsf_pt_end() |
| #define | __vsf_pt_entry(__state, ...) |
| #define | vsf_pt_entry(...) |
| Mark a re-entry point inside the protothread body. | |
| #define | __vsf_pt_begin(__state) |
| #define | vsf_pt_begin() |
| Begin the protothread body, opened right after implement_vsf_pt(). | |
| #define | vsf_pt_end() |
| End the protothread body started by vsf_pt_begin(), and terminate the protothread. | |
| #define | vsf_pt_wait_for_evt(__evt) |
| Wait cooperatively until the given event arrives. | |
| #define | vsf_pt_wfe(__evt) |
| Alias of vsf_pt_wait_for_evt(). | |
| #define | vsf_pt_yield() |
| Yield the cpu cooperatively: mark a re-entry point and post a VSF_EVT_YIELD event to the current protothread, so that it will be rescheduled. | |
| #define | vsf_pt_raw_next() |
| Set the protothread state to the next re-entry point, without emitting the re-entry label. | |
| #define | vsf_pt_raw_entry(...) |
| Emit a re-entry label, optionally executing the given code first. | |
| #define | vsf_pt_wait_until(...) |
| Wait cooperatively until the given condition is satisfied. | |
| #define | __vsf_pt_call_sub(__name, __target, ...) |
| #define | vsf_pt_call_sub(__name, __target) |
| Call an event-driven subroutine (sub-eda) from the current protothread, and wait until it finishes. | |
| #define | vsf_pt_call_pt(__name, __target) |
| Call another protothread as a subroutine from the current protothread, and wait until it finishes. | |
| #define | vsf_eda_call_pt(__name, __target) |
| Call a protothread as a subroutine from an event-driven task (eda), without blocking. | |
| #define | __vsf_pt_call_task(__name, __target, ...) |
| #define | vsf_pt_call_task(__name, __target, __ret_addr, ...) |
| Call a task as a sub-task from the current protothread, and wait until it finishes. | |
| #define | vsf_pt_start vsf_teda_start |
| Start a protothread with the given configuration. In this variant (VSF_KERNEL_CFG_EDA_SUPPORT_TIMER is ENABLED) it is mapped to vsf_teda_start(), so timer services are available. | |
| #define | implement_vsf_pt(__name) |
| Start the implementation of the protothread entry function. | |
| #define | implement_vsf_pt_ex(__name, __FUNC_NAME) |
| Start the implementation of the protothread entry function with a dedicated function name. | |
| #define | imp_vsf_pt(__name) |
| Alias of implement_vsf_pt(). | |
| #define | imp_vsf_pt_ex(__name, __FUNC_NAME) |
| Alias of implement_vsf_pt_ex(). | |
| #define | __vsf_pt_func(__name) |
| Expand to the name of the protothread entry function. | |
| #define | vsf_pt_func(__name) |
| #define | __vsf_pt(__name) |
| Expand to the type name of the protothread control block. | |
| #define | vsf_pt(__name) |
| #define | __def_vsf_pt(__name, ...) |
| #define | def_vsf_pt(__name, ...) |
| Define a protothread control block. | |
| #define | end_def_vsf_pt(...) |
| End a protothread definition started by def_vsf_pt(). It is empty and only used for coding style symmetry. | |
| #define | define_vsf_pt(__name, ...) |
| Alias of def_vsf_pt(). | |
| #define | end_define_vsf_pt(...) |
| Alias of end_def_vsf_pt(). | |
| #define | __declare_vsf_pt(__name) |
| #define | declare_vsf_pt(__name) |
| Declare a protothread (the protothread class, its control block type and its entry function prototype) before it is defined by def_vsf_pt(). | |
| #define | dcl_vsf_pt(__name) |
| Alias of declare_vsf_pt(). | |
| #define | __init_vsf_pt(__name, __pt, __pri, ...) |
| #define | vsf_pt_call_thread(__name, __target) |
| Call a thread from the current protothread, and wait until the thread terminates. | |
| #define | init_vsf_pt(__name, __pt, __pri, ...) |
| Prepare and start a protothread defined by def_vsf_pt(). | |
Typedefs | |
| typedef vsf_teda_t | vsf_pt_t |
| Protothread type, alias of vsf_teda_t when VSF_KERNEL_CFG_EDA_SUPPORT_TIMER is ENABLED. | |
| typedef vsf_eda_evthandler_t | vsf_pt_entry_t |
| Protothread entry function, with the eda event handler signature (alias of vsf_eda_evthandler_t) | |
| #define __implement_vsf_pt | ( | __name | ) |
| #define __implement_vsf_pt_ex | ( | __name, | |
| __func_name ) |
| #define __vsf_pt_state | ( | ) |
| #define __vsf_pt_end | ( | ) |
| #define __vsf_pt_entry | ( | __state, | |
| ... ) |
| #define vsf_pt_entry | ( | ... | ) |
Mark a re-entry point inside the protothread body.
| [in] | ... | optional code executed right after the re-entry point is set |
| #define __vsf_pt_begin | ( | __state | ) |
| #define vsf_pt_begin | ( | ) |
Begin the protothread body, opened right after implement_vsf_pt().
| #define vsf_pt_end | ( | ) |
End the protothread body started by vsf_pt_begin(), and terminate the protothread.
| #define vsf_pt_wait_for_evt | ( | __evt | ) |
Wait cooperatively until the given event arrives.
| [in] | __evt | the event to wait for, of type vsf_evt_t |
| #define vsf_pt_wfe | ( | __evt | ) |
Alias of vsf_pt_wait_for_evt().
| [in] | __evt | the event to wait for, of type vsf_evt_t |
| #define vsf_pt_yield | ( | ) |
Yield the cpu cooperatively: mark a re-entry point and post a VSF_EVT_YIELD event to the current protothread, so that it will be rescheduled.
| #define vsf_pt_raw_next | ( | ) |
Set the protothread state to the next re-entry point, without emitting the re-entry label.
| #define vsf_pt_raw_entry | ( | ... | ) |
Emit a re-entry label, optionally executing the given code first.
| [in] | ... | optional code executed before the re-entry label |
| #define vsf_pt_wait_until | ( | ... | ) |
Wait cooperatively until the given condition is satisfied.
| [in] | ... | the condition to wait for, must be an if-then clause, e.g. vsf_pt_wait_until( if (...) ); |
| #define __vsf_pt_call_sub | ( | __name, | |
| __target, | |||
| ... ) |
| #define vsf_pt_call_sub | ( | __name, | |
| __target ) |
Call an event-driven subroutine (sub-eda) from the current protothread, and wait until it finishes.
| [in] | __name | entry function of the subroutine |
| [in] | __target | pointer to the target (parameter) of the subroutine |
| #define vsf_pt_call_pt | ( | __name, | |
| __target ) |
Call another protothread as a subroutine from the current protothread, and wait until it finishes.
| [in] | __name | name of the sub protothread |
| [in] | __target | pointer to the control block of the sub protothread |
| #define vsf_eda_call_pt | ( | __name, | |
| __target ) |
Call a protothread as a subroutine from an event-driven task (eda), without blocking.
| [in] | __name | name of the protothread |
| [in] | __target | pointer to the control block of the protothread |
| #define __vsf_pt_call_task | ( | __name, | |
| __target, | |||
| ... ) |
| #define vsf_pt_call_task | ( | __name, | |
| __target, | |||
| __ret_addr, | |||
| ... ) |
Call a task as a sub-task from the current protothread, and wait until it finishes.
| [in] | __name | name of the sub-task |
| [in] | __target | pointer to the control block of the sub-task |
| [out] | __ret_addr | pointer receiving the fsm_rt_t return value of the sub-task, can be NULL |
| [in] | ... | optional size of the local variables of the sub-task frame |
| #define vsf_pt_start vsf_teda_start |
Start a protothread with the given configuration. In this variant (VSF_KERNEL_CFG_EDA_SUPPORT_TIMER is ENABLED) it is mapped to vsf_teda_start(), so timer services are available.
| [in] | __pt | pointer to the protothread, of type vsf_pt_t |
| [in] | __cfg | pointer to the configuration, of type vsf_eda_cfg_t |
| #define implement_vsf_pt | ( | __name | ) |
Start the implementation of the protothread entry function.
| [in] | __name | name of the protothread |
| #define implement_vsf_pt_ex | ( | __name, | |
| __FUNC_NAME ) |
Start the implementation of the protothread entry function with a dedicated function name.
| [in] | __name | name of the protothread |
| [in] | __FUNC_NAME | function name of the entry function |
| #define imp_vsf_pt | ( | __name | ) |
Alias of implement_vsf_pt().
| [in] | __name | name of the protothread |
| #define imp_vsf_pt_ex | ( | __name, | |
| __FUNC_NAME ) |
Alias of implement_vsf_pt_ex().
| [in] | __name | name of the protothread |
| [in] | __FUNC_NAME | function name of the entry function |
| #define __vsf_pt_func | ( | __name | ) |
Expand to the name of the protothread entry function.
| [in] | __name | name of the protothread |
| #define vsf_pt_func | ( | __name | ) |
| #define __vsf_pt | ( | __name | ) |
Expand to the type name of the protothread control block.
| [in] | __name | name of the protothread |
| #define vsf_pt | ( | __name | ) |
| #define def_vsf_pt | ( | __name, | |
| ... ) |
Define a protothread control block.
| [in] | __name | name of the protothread |
| [in] | ... | member variables of the protothread control block |
| #define end_def_vsf_pt | ( | ... | ) |
End a protothread definition started by def_vsf_pt(). It is empty and only used for coding style symmetry.
| #define define_vsf_pt | ( | __name, | |
| ... ) |
Alias of def_vsf_pt().
| [in] | __name | name of the protothread |
| [in] | ... | member variables of the protothread control block |
| #define end_define_vsf_pt | ( | ... | ) |
Alias of end_def_vsf_pt().
| #define __declare_vsf_pt | ( | __name | ) |
| #define declare_vsf_pt | ( | __name | ) |
Declare a protothread (the protothread class, its control block type and its entry function prototype) before it is defined by def_vsf_pt().
| [in] | __name | name of the protothread |
| #define dcl_vsf_pt | ( | __name | ) |
Alias of declare_vsf_pt().
| [in] | __name | name of the protothread |
| #define __init_vsf_pt | ( | __name, | |
| __pt, | |||
| __pri, | |||
| ... ) |
| #define vsf_pt_call_thread | ( | __name, | |
| __target ) |
Call a thread from the current protothread, and wait until the thread terminates.
| [in] | __name | name of the thread type defined by def_vsf_thread() |
| [in] | __target | pointer to the thread control block |
| #define init_vsf_pt | ( | __name, | |
| __pt, | |||
| __pri, | |||
| ... ) |
Prepare and start a protothread defined by def_vsf_pt().
| [in] | __name | name of the protothread |
| [in] | __pt | pointer to the protothread instance |
| [in] | __pri | priority of the protothread, of type vsf_prio_t |
| [in] | ... | optional extra initializers for vsf_eda_cfg_t |
| typedef vsf_teda_t vsf_pt_t |
Protothread type, alias of vsf_teda_t when VSF_KERNEL_CFG_EDA_SUPPORT_TIMER is ENABLED.
| typedef vsf_eda_evthandler_t vsf_pt_entry_t |
Protothread entry function, with the eda event handler signature (alias of vsf_eda_evthandler_t)