INtime SDK Help
knRtSleep
INtime SDK v7 > About INtime > INtime Kernel > Time management > knRtSleep

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
);

Parameters

dwKernelTicks
Number of low-level clock intervals the calling thread sleeps. The duration of this interval is configurable and its value may be obtained from the SYSINFO structure which is read using CopyRtSystemInfo. The macro US_TO_KTICKS may be used to convert a value in microseconds to a low-level (kernel) tick count using the information supplied in this structure.
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.

Remarks

This is a rescheduling call and is unsafe for use by interrupt handlers.

Requirements

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

Scheduler

System & Status

Structures