IWDFInterrupt::SetExtendedPolicy method

[Warning: UMDF 2 is the latest version of UMDF and supersedes UMDF 1. All new UMDF drivers should be written using UMDF 2. No new features are being added to UMDF 1 and there is limited support for UMDF 1 on newer versions of Windows 10. Universal Windows drivers must use UMDF 2. For more info, see Getting Started with UMDF.]

The SetExtendedPolicy method specifies the interrupt priority, processor affinity, affinity policy, and processor group for a specified interrupt.

Syntax


void SetExtendedPolicy(
  [in] WDF_INTERRUPT_EXTENDED_POLICY *PolicyAndGroup
);

Parameters

PolicyAndGroup [in]

A pointer to a caller-allocated WDF_INTERRUPT_EXTENDED_POLICY structure that the driver has previously initialized by calling WDF_INTERRUPT_EXTENDED_POLICY_INIT.

Return value

This method does not return a value.

Remarks

This method is equivalent to KMDF’s WdfInterruptSetExtendedPolicy. See the Remarks section of WdfInterruptSetExtendedPolicy for more information about this method.

If a driver is running on an operating system version that is earlier than Windows 7, the framework ignores the value that the driver specifies for the processor group number when it calls SetExtendedPolicy.

For more information about handling interrupts in UMDF drivers, see Accessing Hardware and Handling Interrupts.

Examples

The following code example calls WDF_INTERRUPT_EXTENDED_POLICY_INIT to initialize a WDF_INTERRUPT_EXTENDED_POLICY structure; sets values for the policy, priority, and target processor set; and calls SetExtendedPolicy. The example sets normal priority for the interrupt and assigns the interrupt to processor 0 in processor group 2.



IWDFInterrupt* pInterrupt;

#define AFFINITY_MASK(n) ((ULONG_PTR)1 << (n))

WDF_INTERRUPT_EXTENDED_POLICY myExtendedPolicy;

WDF_INTERRUPT_EXTENDED_POLICY_INIT(&myExtendedPolicy);
myExtendedPolicy.Policy = WdfIrqPolicySpecifiedProcessors;
myExtendedPolicy.Priority = WdfIrqPriorityNormal;
myExtendedPolicy.TargetProcessorSetAndGroup.Mask = AFFINITY_MASK(0);
myExtendedPolicy.TargetProcessorSetAndGroup.Group = 2;

pInterrupt->SetExtendedPolicy(
                              &myExtendedPolicy
 );

Requirements

Target platform

Desktop

End of support

Unavailable in UMDF 2.0 and later.

Minimum UMDF version

1.11

Header

Wudfddi.h

DLL

WUDFx.dll

See also

IWDFInterrupt
WDF_INTERRUPT_EXTENDED_POLICY
WDF_INTERRUPT_EXTENDED_POLICY_INIT

 

 

Send comments about this topic to Microsoft

Show: