...
µC/OS-III allows OSSchedLock()
to be nested up to 250 levels deep. Scheduling is enabled when an equal number of OSSchedUnlock()
calls have been made.
Arguments
p_err
is a pointer to a variable that will contain an error code returned by this function.
...
If OS_CFG_CALLED_FROM_ISR_CHK_EN
set to 1
in os_cfg.h
: if you attempted to call OSSchedLock()
from an ISR.
Returned Value
None
Notes/Warnings
After calling OSSchedLock()
, the application must not make system calls that suspend execution of the current task; that is, the application cannot call OSTimeDly()
, OSTimeDlyHMSM()
, OSFlagPend()
, OSSemPend()
, OSMutexPend()
, or OSQPend()
. Since the scheduler is locked out, no other task is allowed to run, and the system will lock up.