|
SuperTinyKernel™ RTOS 1.08.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
|
Typedefs | |
| typedef enum cy_scheduler_state | cy_scheduler_state_t |
Enumerations | |
| enum | cy_scheduler_state { CY_SCHEDULER_STATE_NOT_STARTED , CY_SCHEDULER_STATE_INACTIVE , CY_SCHEDULER_STATE_LOCKED , CY_SCHEDULER_STATE_READY , CY_SCHEDULER_STATE_SUSPENDED , CY_SCHEDULER_STATE_RUNNING , CY_SCHEDULER_STATE_UNKNOWN } |
| cy_rslt_t | cy_rtos_scheduler_suspend (void) |
| cy_rslt_t | cy_rtos_scheduler_resume (void) |
| cy_rslt_t | cy_rtos_scheduler_get_state (cy_scheduler_state_t *state) |
APIs for working with Scheduler.
| typedef enum cy_scheduler_state cy_scheduler_state_t |
The state a scheduler can be in
| enum cy_scheduler_state |
The state a scheduler can be in
Definition at line 145 of file cyabs_rtos.h.
| cy_rslt_t cy_rtos_scheduler_get_state | ( | cy_scheduler_state_t * | state | ) |
Gets the state the scheduler is currently in
This function is called to determine if the scheduler is running/suspend/not started.
| [out] | state | Returns the state the scheduler is currently in |
Definition at line 814 of file cyabs_rtos_stk.cpp.
References CY_RTOS_BAD_PARAM, CY_SCHEDULER_STATE_NOT_STARTED, CY_SCHEDULER_STATE_RUNNING, CY_SCHEDULER_STATE_SUSPENDED, stk::IKernel::KSTATE_INACTIVE, stk::IKernel::KSTATE_LOCKED, stk::IKernel::KSTATE_READY, stk::IKernel::KSTATE_RUNNING, and stk::IKernel::KSTATE_SUSPENDED.
| cy_rslt_t cy_rtos_scheduler_resume | ( | void | ) |
Resume the scheduler
This function resumes the scheduler after it was suspended. If incorrectly called (called more times than cy_rtos_scheduler_suspend) it fails returning CY_RTOS_BAD_PARAM
Definition at line 799 of file cyabs_rtos_stk.cpp.
References CY_RTOS_BAD_PARAM, stk::IKernel::KSTATE_LOCKED, and stk::UnlockScheduler().
| cy_rslt_t cy_rtos_scheduler_suspend | ( | void | ) |
Suspend the scheduler
This function suspends the scheduler and makes sure that the code executed after the call does not get interrupted by a task switch. Multiple suspend calls can be done making nesting possible granted that the same number of resume calls are made.
< not allowed in this context (ISR, scheduler not running or locked, not a thread created by cy_rtos_thread_create())
< not allowed in this context (ISR, scheduler not running or locked, not a thread created by cy_rtos_thread_create())
Definition at line 774 of file cyabs_rtos_stk.cpp.
References CY_RTOS_STK_ERR_CONTEXT, stk::IKernel::KSTATE_LOCKED, stk::IKernel::KSTATE_RUNNING, stk::LOCK_WAS_LOCKED, stk::LOCK_WAS_UNLOCKED, and stk::LockScheduler().