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

Puts the calling thread to sleep for the specified number of kernel ticks. A kernel tick period is configurable and the current configuration may be read using CopyRtSystemInfo.

VOID knRtSleep(
    DWORD dwKernelTicks
);

Parameters

dwKernelTicks
Number of kernel 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 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