HW_WORKITEM callback function (storport.h)

A miniport-provided callback function for processing a Storport work item request.

Syntax

HW_WORKITEM HwWorkitem;

void HwWorkitem(
  [in]           PVOID HwDeviceExtension,
  [in, optional] PVOID Context,
  [in]           PVOID Worker
)
{...}

Parameters

[in] HwDeviceExtension

A pointer to the miniport driver's per-HBA storage area.

[in, optional] Context

Optional context provided by the miniport in the Callback parameter of StorPortQueueWorkItem.

[in] Worker

A pointer to an opaque buffer that holds context information for the work item returned by StorPortInitializeWorker.

Return value

None

Remarks

If needed, a work item can be queued within HwStorWorkItem. Call StorPortQueueWorkItem with the current work item to reuse it. Otherwise, call StorPortFreeWorker to release the work item.

No locks are acquired by Storport when the callback is invoked. The miniport is responsible for any synchronization required in the callback routine.

The name HwStorWorkItem is just a placeholder for the miniport function that is pointed to by the Callback parameter of StorPortQueueWorkItem. The actual prototype of this routine is defined in Storport.h as follows:

typedef
VOID
HW_WORKITEM (
    _In_     PVOID HwDeviceExtension,
    _In_Opt_ PVOID Context,
    _In_     PVOID Worker,
    );

Requirements

Requirement Value
Minimum supported client Available in Windows 8 and later versions of Windows.
Target Platform Universal
Header storport.h (include Storport.h)
IRQL PASSIVE_LEVEL

See also

StorPortFreeWorker

StorPortInitializeWorker

StorPortQueueWorkItem