Summary and General Tips for Synchronization
Table 10-3 summarizes the synchronization techniques that are available to WDF drivers.
Table 10-3. Summary of Synchronization Techniques
Technique | UMDF usage | KMDF usage |
---|---|---|
Framework-created object presentation lock for device object and queue objects | Acquire and release with IWDFObject::AcquireLock and IWDFObject::ReleaseLock on the device or queue object. | Acquire and release with WdfObjectAcquireLock and WdfObjectReleaseLock. |
Synchronization scope | Configure with IWDFDeviceInitialize::SetLockingConstraint. | Configure in object attributes structure for driver, device, queue, and file objects. |
Automatic serialization | Not applicable. | Configure in object configuration structure for DPCs, timers, and work items. |
Get Developing Drivers with the Windows® Driver Foundation 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.