Skip to content

Latest commit

 

History

History
116 lines (83 loc) · 5.52 KB

ne-wdfobject-_wdf_synchronization_scope.md

File metadata and controls

116 lines (83 loc) · 5.52 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NE:wdfobject._WDF_SYNCHRONIZATION_SCOPE
_WDF_SYNCHRONIZATION_SCOPE (wdfobject.h)
The WDF_SYNCHRONIZATION_SCOPE enumeration type specifies how the framework will synchronize execution of an object's event callback functions.
wdf\wdf_synchronization_scope.htm
wdf
02/26/2018
WDF_SYNCHRONIZATION_SCOPE enumeration
DFGenObjectRef_62dd47ff-1d2a-454e-9083-cbf68f1679d2.xml, WDF_SYNCHRONIZATION_SCOPE, WDF_SYNCHRONIZATION_SCOPE enumeration, WdfSynchronizationScopeDevice, WdfSynchronizationScopeInheritFromParent, WdfSynchronizationScopeInvalid, WdfSynchronizationScopeNone, WdfSynchronizationScopeQueue, _WDF_SYNCHRONIZATION_SCOPE, kmdf.wdf_synchronization_scope, wdf.wdf_synchronization_scope, wdfobject/WDF_SYNCHRONIZATION_SCOPE, wdfobject/WdfSynchronizationScopeDevice, wdfobject/WdfSynchronizationScopeInheritFromParent, wdfobject/WdfSynchronizationScopeInvalid, wdfobject/WdfSynchronizationScopeNone, wdfobject/WdfSynchronizationScopeQueue
wdfobject.h
Wdf.h
Windows
1.0
2.0
Windows
WDF_SYNCHRONIZATION_SCOPE
_WDF_SYNCHRONIZATION_SCOPE
wdfobject/_WDF_SYNCHRONIZATION_SCOPE
WDF_SYNCHRONIZATION_SCOPE
wdfobject/WDF_SYNCHRONIZATION_SCOPE
APIRef
kbSyntax
HeaderDef
wdfobject.h
_WDF_SYNCHRONIZATION_SCOPE
WDF_SYNCHRONIZATION_SCOPE

_WDF_SYNCHRONIZATION_SCOPE enumeration

-description

[Applies to KMDF and UMDF]

The WDF_SYNCHRONIZATION_SCOPE enumeration type specifies how the framework will synchronize execution of an object's event callback functions.

-enum-fields

-field WdfSynchronizationScopeInvalid:0x00

Reserved for system use.

-field WdfSynchronizationScopeInheritFromParent

The framework uses the synchronization scope value that was specified for the object's parent object. This value is the default if a driver does not specify a WDF_SYNCHRONIZATION_SCOPE-typed value.

-field WdfSynchronizationScopeDevice

The framework synchronizes execution of the event callback functions of all queue and file objects that are underneath a device object in the driver's object hierarchy.

Additionally, if the driver sets the AutomaticSerialization member to TRUE in the configuration structure for an interrupt, DPC, work-item, or timer object that is underneath the same device object, the framework also synchronizes that object's callback functions.

The framework obtains the device object's synchronization lock before calling a callback function. Therefore, these callback functions run one at a time. However, if the driver creates multiple objects of the same type, but under different device objects, their event callback functions might run concurrently on a multiprocessor system.

-field WdfSynchronizationScopeQueue

This value affects queue objects only. The framework synchronizes the event callback functions of the queue object so that only one executes at a time.

Additionally, if the driver sets AutomaticSerialization to TRUE in the configuration structure for an interrupt, DPC, work-item, or timer object that is underneath the queue object or its parent device object, the framework also synchronizes that object's callback functions.

The framework obtains the queue object's synchronization lock before calling any callback functions that belong to the object.

If the driver creates multiple queue objects, their event callback functions might run concurrently on a multiprocessor system.

For framework versions 1.9 and later, a driver should set WdfSynchronizationScopeQueue for individual queue objects. To use this scope with earlier versions of the framework, the driver must set WdfSynchronizationScopeQueue for the parent device object and WdfSynchronizationScopeInheritFromParent for the queue object.

-field WdfSynchronizationScopeNone

The framework does not synchronize the object's event callback functions, so the callback functions might run concurrently on a multiprocessor system.

-remarks

Drivers use the WDF_SYNCHRONIZATION_SCOPE enumeration type to specify the SynchronizationScope member of an object's WDF_OBJECT_ATTRIBUTES structure.

You can specify a SynchronizationScope value for only the following objects:

  • Framework driver objects
  • Framework device objects
  • Framework queue objects
The framework sets the SynchronizationScope value of framework driver objects to WdfSynchronizationScopeNone. It sets the SynchronizationScope value of framework device objects and framework queue objects to WdfSynchronizationScopeInheritFromParent.

For more information about synchronization of a driver's event callback functions, see Synchronization Techniques for Framework-Based Drivers.

-see-also

WDF_OBJECT_ATTRIBUTES