INtime SDK Help
knStopRtScheduler
INtime SDK v6 > About INtime > INtime Kernel > Scheduler > 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 higher-priority thread is waiting, that waiting thread becomes ready, but it does not become the running thread until scheduling resumes.

This function does not necessarily halt thread switching. If the running thread invokes a blocking system call (such as knWaitForRtData or knRtSleep) while scheduling is stopped, the thread enters the asleep or suspended state immediately and the highest priority ready thread becomes the running thread. The new thread is restored with all its scheduling locks in place. When the first thread is again restored to the running state, its scheduling locks are also restored to the level they were at the time of the block.

You can invoke this function repeatedly when scheduling is locked. Scheduling is resumed only when all scheduling locks are canceled. This call is non-scheduling and is safe for use by interrupt handlers.

VOID knStopRtScheduler(VOID);

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/rtbase.h rt.h rt.lib

See Also

Scheduler system calls knWaitForRtData, knRtSleep