KeSetImportanceDpc - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ntddk.h

VOID KeSetImportanceDpc(
  [in, out] PRKDPC          Dpc,
  [in]      KDPC_IMPORTANCE Importance
);
View the official Windows Driver Kit DDI reference
// wdm.h

VOID KeSetImportanceDpc(
  [in, out] PRKDPC          Dpc,
  [in]      KDPC_IMPORTANCE Importance
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ntddk-kesetimportancedpc)

KeSetImportanceDpc function (ntddk.h)

Description

The KeSetImportanceDpc routine specifies how soon the DPC routine is run.

Parameters

Dpc [in, out]

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

Importance [in]

Specifies one of the following system-defined values to determine the behavior of KeInsertQueueDpc and IoRequestDpc when either routine is used to queue the DPC.

LowImportance

Place the DPC at the end of the DPC queue, and do not begin processing of the queue.

MediumImportance

Place the DPC at the end of the DPC queue. If the DPC is assigned to the current processor's DPC queue, begin processing the queue immediately. MediumImportance is the default value for Importance.

MediumHighImportance

Place the DPC at the end of the DPC queue, and begin processing the queue immediately. MediumHighImportance is available only on Windows Vista and later versions of Windows.

HighImportance

Place the DPC at the beginning of the DPC queue, and begin processing the queue immediately.

Remarks

The KeSetImportanceDpc routine influences how soon a DPC is run after it is queued by determining:

By default, DPCs are assigned to the DPC queue for the current processor, so specifying MediumImportance or MediumHighImportance for Importance has the same effect. However, drivers can use KeSetTargetProcessorDpc to change the processor that the DPC will be assigned to.

For Windows Vista and later versions of the Windows operating system, you can use KeSetImportanceDpc for threaded DPCs. If the caller sets Importance to HighImportance, the DPC is placed at the beginning of the queue; otherwise, it is placed at the end. The routine does not affect when the threaded DPC queue is processed. Threaded DPCs are always processed by a dedicated thread at IRQL = PASSIVE_LEVEL. For more information about threaded DPCs, see Introduction to Threaded DPCs.

Note that a driver must call KeSetImportanceDpc before it calls KeInsertQueueDpc and IoRequestDpc to have any effect.

For more information about how the system processes the DPC queue, see Organization of DPC Queues.

See also

IoRequestDpc

KeInitializeDpc

KeInsertQueueDpc

KeSetTargetProcessorDpc

KeSynchronizeExecution


Windows Driver Kit DDI reference (nf-wdm-kesetimportancedpc)

KeSetImportanceDpc function (wdm.h)

Description

The KeSetImportanceDpc routine specifies how soon the DPC routine is run.

Parameters

Dpc [in, out]

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

Importance [in]

Specifies one of the following system-defined values to determine the behavior of KeInsertQueueDpc and IoRequestDpc when either routine is used to queue the DPC.

LowImportance

Place the DPC at the end of the DPC queue, and do not begin processing of the queue.

MediumImportance

Place the DPC at the end of the DPC queue. If the DPC is assigned to the current processor's DPC queue, begin processing the queue immediately. MediumImportance is the default value for Importance.

MediumHighImportance

Place the DPC at the end of the DPC queue, and begin processing the queue immediately. MediumHighImportance is available only on Windows Vista and later versions of Windows.

HighImportance

Place the DPC at the beginning of the DPC queue, and begin processing the queue immediately.

- Importance.HighImportance

Place the DPC at the beginning of the DPC queue, and begin processing the queue immediately.

- Importance.LowImportance

Place the DPC at the end of the DPC queue, and do not begin processing of the queue.

- Importance.MediumHighImportance

Place the DPC at the end of the DPC queue, and begin processing the queue immediately. MediumHighImportance is available only on Windows Vista and later versions of Windows.

- Importance.MediumImportance

Place the DPC at the end of the DPC queue. If the DPC is assigned to the current processor's DPC queue, begin processing the queue immediately. MediumImportance is the default value for Importance.

Remarks

The KeSetImportanceDpc routine influences how soon a DPC is run after it is queued by determining:

By default, DPCs are assigned to the DPC queue for the current processor, so specifying MediumImportance or MediumHighImportance for Importance has the same effect. However, drivers can use KeSetTargetProcessorDpc to change the processor that the DPC will be assigned to.

For Windows Vista and later versions of the Windows operating system, you can use KeSetImportanceDpc for threaded DPCs. If the caller sets Importance to HighImportance, the DPC is placed at the beginning of the queue; otherwise, it is placed at the end. The routine does not affect when the threaded DPC queue is processed. Threaded DPCs are always processed by a dedicated thread at IRQL = PASSIVE_LEVEL. For more information about threaded DPCs, see Introduction to Threaded DPCs.

Note that a driver must call KeSetImportanceDpc before it calls KeInsertQueueDpc and IoRequestDpc to have any effect.

For more information about how the system processes the DPC queue, see Organization of DPC Queues.

See also

IoRequestDpc

KeInitializeDpc

KeInsertQueueDpc

KeSetTargetProcessorDpc

KeSynchronizeExecution