Thread Synchronization

Like user-mode threads in a Win32 application, system threads may need to suspend their execution until some other condition has been satisfied. This section describes the basic synchronization techniques available to system threads.

Time Synchronization

The simplest kind of synchronization involves stopping a thread's execution until a specific time interval elapses. Although Timer objects, described later in this chapter, can be used, the kernel provides a convenient function, KeDelayExecutionThread (illustrated in Table 14.3) that is easier to use.

Table 14.3. KeDelayExecutionThread Function Prototype
NTSTATUS KeDelayExecutionThread IRQL == PASSIVE_LEVEL
Parameter Description
IN KPROCESSOR_MODE WaitModeKernelMode ...

Get Windows® 2000 Device Driver Book: A Guide for Programmers, Second Edition, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.