Puts the calling thread to sleep for the specified number of low-level ticks. A low-level tick period is configurable and the current configuration may be read using CopyRtSystemInfo.
VOID knRtSleep( DWORD dwKernelTicks );
dwKernelTicks
KN_DONT_WAIT |
The thread does not wait at all. KN_DONT_WAIT does not cause the running thread to go to sleep. It has an effect only if there are other ready threads of equal priority. In that case, the running thread is placed at the end of the ready queue after all other ready threads of equal priority. If there are no other ready threads of equal priority, the current thread remains running. |
KN_WAIT_FOREVER |
The thread is willing to wait indefinitely. KN_WAIT_FOREVER causes the thread to sleep forever. This effectively deletes the thread but the thread's memory is not released. |
This is a rescheduling call and is unsafe for use by interrupt handlers.
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 | intime/rt/include/rtbase.h | rt.h | rt.lib |