Skip to content

Latest commit

 

History

History
105 lines (71 loc) · 4.59 KB

nf-wudfddi-iwdfinterrupt-setextendedpolicy.md

File metadata and controls

105 lines (71 loc) · 4.59 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
NF:wudfddi.IWDFInterrupt.SetExtendedPolicy
IWDFInterrupt::SetExtendedPolicy (wudfddi.h)
The SetExtendedPolicy method specifies the interrupt priority, processor affinity, affinity policy, and processor group for a specified interrupt.
wdf\iwdfinterrupt_setextendedpolicy.htm
wdf
02/26/2018
IWDFInterrupt::SetExtendedPolicy
IWDFInterrupt interface,SetExtendedPolicy method, IWDFInterrupt.SetExtendedPolicy, IWDFInterrupt::SetExtendedPolicy, SetExtendedPolicy, SetExtendedPolicy method, SetExtendedPolicy method,IWDFInterrupt interface, umdf.iwdfinterrupt_setextendedpolicy, wdf.iwdfinterrupt_setextendedpolicy, wudfddi/IWDFInterrupt::SetExtendedPolicy
wudfddi.h
Desktop
1.11
Unavailable in UMDF 2.0 and later.
WUDFx.dll
Windows
IWDFInterrupt::SetExtendedPolicy
wudfddi/IWDFInterrupt::SetExtendedPolicy
APIRef
kbSyntax
COM
WUDFx.dll
IWDFInterrupt::SetExtendedPolicy

IWDFInterrupt::SetExtendedPolicy

-description

[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.

-parameters

-param 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.

-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
 );

-see-also

IWDFInterrupt

WDF_INTERRUPT_EXTENDED_POLICY

WDF_INTERRUPT_EXTENDED_POLICY_INIT