StorPortQueueWorkItem routine

Schedules a Storport work item to execute within the context of a system worker thread.

Syntax


ULONG StorPortQueueWorkItem(
  _In_     PVOID        HwDeviceExtension,
  _In_     PHW_WORKITEM WorkItemCallback,
  _In_     PVOID        Worker,
  _In_opt_ PVOID        Context
);

Parameters

HwDeviceExtension [in]

A pointer to the hardware device extension for the host bus adapter (HBA).

WorkItemCallback [in]

A pointer to a work item callback routine supplied by the miniport. This routine is called in context of the system thread to process the scheduled WorkItem.

Worker [in]

A pointer to an opaque buffer for the worker returned by StorPortInitializeWorker.

Context [in, optional]

Optional context for the WorkItem that is processed by the callback routine in WorkItemCallback.

Return value

The StorPortQueueWorkItem routine returns one of these status codes:

Return codeDescription
STOR_STATUS_INVALID_IRQL

Current IRQL > DISPATCH_LEVEL.

STOR_STATUS_INVALID_PARAMETER

HwDeviceExtension, Worker, or WorkItemCallback is NULL.

STOR_STATUS_BUSY

The work item was is already queued for processing.

STOR_STATUS_SUCCESS

The work item was successfully queued.

 

Requirements

Target platform

Desktop

Version

Available in Windows 8 and later versions of Windows.

Header

Storport.h (include Storport.h)

IRQL

<= DISPATCH_LEVEL

See also

HwStorWorkItem
StorPortFreeWorker
StorPortInitializeWorker

 

 

Send comments about this topic to Microsoft

Anzeigen: