RTOS Abstraction (abstraction-rtos)
Scheduler

General Description

APIs for working with Scheduler.

cy_rslt_t cy_rtos_scheduler_suspend (void)
 Suspend the scheduler. More...
 
cy_rslt_t cy_rtos_scheduler_resume (void)
 Resume the scheduler. More...
 

Function Documentation

◆ cy_rtos_scheduler_suspend()

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.

Note
API functions that have the potential to cause a context switch must not be called while the scheduler is suspended.
Returns
The status of scheduler suspend request. [CY_RSLT_SUCCESS]

◆ cy_rtos_scheduler_resume()

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

Returns
The status of scheduler resume request. [CY_RSLT_SUCCESS, CY_RTOS_BAD_PARAM]