Training
×

Low-Level Scheduler Functions

knStopRtScheduler temporarily locks the scheduling mechanism or places an additional lock on the mechanism for the running thread. Any thread state transitions that move the thread from the running state to the ready state are delayed until scheduling is resumed. For example, with scheduling stopped, if the running thread sends a message to a mailbox at which a better priority thread is waiting, that waiting thread becomes ready, but it does not become the running thread until scheduling resumes.
You can invoke this function repeatedly. Scheduling is resumed only when all scheduling locks are canceled. This call is non-scheduling and is safe for use by interrupt handlers.
 
knStartRtScheduler cancels one scheduling lock imposed by the knStopRtScheduler function. If the lock that is canceled is the last outstanding scheduling lock, all thread state transitions that were temporarily delayed are carried out, and the best priority ready thread begins executing. This is a scheduling call and can be used in an interrupt handler after SignalEndOfRtInterupt has been called.