StorPortQueueWorkItem function (storport.h)
StorPortQueueWorkItem queues a Storport work item to execute within the context of a system (kernel) worker thread.
Syntax
ULONG StorPortQueueWorkItem(
[in] PVOID HwDeviceExtension,
[in] PHW_WORKITEM WorkItemCallback,
[in] PVOID Worker,
[in, optional] PVOID Context
);
Parameters
[in] HwDeviceExtension
A pointer to the hardware device extension for the host bus adapter (HBA).
[in] WorkItemCallback
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 work item that Worker points to.
[in] Worker
A pointer to an opaque buffer for the allocated and initialized work item returned by StorPortInitializeWorker.
[in, optional] Context
Optional context for the Worker that is processed by the callback routine in WorkItemCallback.
Return value
StorPortQueueWorkItem routine returns one of these status codes:
Return code | Description |
---|---|
STOR_STATUS_BUSY | The work item is already queued for processing. |
STOR_STATUS_INVALID_DEVICE_STATE | The work item cannot be queued as the device is in process of removal. |
STOR_STATUS_INVALID_IRQL | The current IRQL is greater than DISPATCH_LEVEL. |
STOR_STATUS_INVALID_PARAMETER | HwDeviceExtension, Worker, or WorkItemCallback is NULL. |
STOR_STATUS_SUCCESS | The work item was successfully queued. |
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 | <= DISPATCH_LEVEL |