@CHIP-RTOS C Library V2.06 - RTOS API
RTX_Disable_Task_Scheduling
Disable task switching. void RTX_Disable_Task_Scheduling ( void ); Parameters
- -- none --
Return Value
- -- none --
Comments
- This function locks the processor
to the current task, preventing further task switching until either
RTX_Enable_Task_Scheduling
or a sleep API function is called. Entering any sleep
API defeats the task lock. In this case the task lock condition
is released until the task resumes execution. During the sleep,
the system automatically releases the lock condition to allow other
tasks to execute.
During the task lock condition, interrupts still execute provided
that the user leaves interrupts enabled. Installed
Timer
procedures will not be executed.
This call must be followed by a call to
RTX_Enable_Task_Scheduling
as soon as possible to re-enable the task switching.
If this period exceeds a hundred milliseconds then the watchdog
should be triggered (using the Hardware API
hal_refresh_watchdog function)
by the user until the task switching is re-enabled.
Note that this is implemented as a spin lock, such that if for some
reason the task calls here N times then N calls to
RTX_Enable_Task_Scheduling
are required to unwind the spin lock and re-enable the task switching.
See Also
RTOS API
- This library function invokes a RTOS software interrupt.
Refer to this RTOS API function's
documentation
for more details.
Supported since or modified in @CHIP-RTOS version-
SC12 | SC13 | SC11 | SC1x3 |
-
V1.02 | V1.00 | V1.00 | V0.90 |
This API List
List of C Libraries
@CHIP-RTOS Main Index
End of document
|