Microsoft Windows supports numerous synchronization primitives, each of which has unique characteristics. In any situation, the best primitive to use depends on the operations that require synchronization. The table provided for download below lists the synchronization primitives that are available to kernel-mode drivers along with the characteristics of each primitive. It includes the following information: Primitive-Lists the name of the primitive, the name of the data types used to represent it (if any), and the DDIs that acquire and release it. Usage-Describes the type of synchronization the primitive provides and the situations in which to use it. IRQL-Lists the IRQL at which a caller can invoke the primitive and the IRQL at which code that is protected by the primitive runs. Effect on APCs-Indicates whether user, normal kernel, and special kernel asynchronous procedure calls (APCs) can be delivered to the thread while the primitive is in use. Windows supports three types of APCs: | • | User APCs run in user mode and are delivered during the unwind from kernel mode to user mode. This type of APC is used for thread termination and user-mode signaling operations. | | • | Normal kernel APCs are used for thread suspension and hard error pop-ups unless delivery has been disabled using KeEnterCriticalRegion. They run in kernel mode at PASSIVE_LEVEL | | • | Special kernel APCs run in kernel mode at APC_LEVEL and are used in IRP completion. |
Recursive acquisition-Indicates whether the primitive can be acquired recursively, and thus whether it can be used safely in reentrant code. Operating system support-Lists the operating system releases that support this primitive. For more information: Locks, Deadlocks, and Synchronization Windows DDK
General Driver Information > Kernel-Mode Driver Architecture > Design Guide > Synchronization Techniques
|