StorPortIssueDpc function (storport.h)

The StorPortIssueDpc routine issues a deferred procedure call (DPC).

Syntax

BOOLEAN StorPortIssueDpc(
  [in] PVOID     DeviceExtension,
  [in] PSTOR_DPC Dpc,
  [in] PVOID     SystemArgument1,
  [in] PVOID     SystemArgument2
);

Parameters

[in] DeviceExtension

Pointer to the per-adapter device extension.

[in] Dpc

Pointer to a buffer containing an initialized DPC object of type STOR_DPC returned by the StorPortInitializeDpc routine.

[in] SystemArgument1

Pointer to caller-supplied information that will be passed to the deferred routine.

[in] SystemArgument2

Pointer to caller-supplied information that will be passed to the deferred routine.

Return value

The StorPortIssueDpc routine returns TRUE if the DPC was successfully inserted into the DPC queue, and FALSE otherwise.

Remarks

The StorPortIssueDpc routine calls the KeInsertQueueDpc kernel routine to queue the DPC. The KeInsertQueueDpc kernel routine does not allow a DPC to be queued multiple times. Thus, if the DPC object specified by the Dpc parameter is already in the DPC queue, KeInsertQueueDpc ignores the queue request. This ensures that a deferred routine initialized with StorPortInitializeDpc is always synchronized with itself. In other words, the caller does not need to sequentialize calls to the StorPortIssueDpc routine to ensure that multiple instances the routine do not run simultaneously.

If a miniport driver has multiple work-items that must be performed by the same DPC, the miniport driver must ensure that each work item completes before issuing the DPC for the next work item.

Requirements

Requirement Value
Target Platform Universal
Header storport.h (include Storport.h)

See also

KeInsertQueueDpc

STOR_DPC

StorPortInitializeDpc