Expand Minimize

KeSetTargetProcessorDpc routine

The KeSetTargetProcessorDpc routine specifies the processor that a DPC routine will be run on.

Syntax


VOID KeSetTargetProcessorDpc(
  _Inout_  PRKDPC Dpc,
  _In_     CCHAR Number
);

Parameters

Dpc [in, out]

Pointer to the caller's DPC object, which KeInitializeDpc already initialized.

Number [in]

Specifies the zero-based number of the target processor on which the DPC should be queued and executed.

Return value

None

Remarks

On multiprocessor systems, each processor has its own DPC queue. The KeSetTargetProcessorDpc routine specifies which processor's queue the system should use when the driver calls KeInsertQueueDpc or IoRequestDpc to queue a DPC to be run later.

Starting with Windows Vista, you can also use KeSetTargetProcessorDpc to specify the target processor for threaded DPCs.

A call to KeSetTargetProcessorDpcEx that occurs after a DPC object has been queued has no effect on the selection of a processor for the DPC routine to run on. To control the selection of the target processor, a KeSetTargetProcessorDpc call must occur before the call to KeInsertQueueDpc or IoRequestDpc that queues the DPC object.

For more information about DPC queues, see Organization of DPC Queues.

Windows 7 and later versions of Windows support processor groups. Drivers that are designed to handle information about processor groups should use the KeSetTargetProcessorDpcEx routine, which specifies a processor group, instead of KeSetTargetProcessorDpc, which does not. However, the implementation of KeSetTargetProcessorDpc in Windows 7 and later versions of Windows provides compatibility for drivers that were written for earlier versions of Windows, which do not support processor groups. In this implementation, if Number is less than the number of active logical processors in group 0, KeSetTargetProcessorDpc sets the target for the DPC to the processor in group 0 that is specified by Number. Otherwise, the DPC target does not change.

Requirements

Version

Available starting with Windows 2000.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

Any level

See also

IoRequestDpc
KeGetCurrentProcessorNumber
KeInitializeDpc
KeInsertQueueDpc
KeSetImportanceDpc
KeSetTargetProcessorDpcEx

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft