// storport.h
ULONG StorPortSetPriorityThread(
[in] PVOID HwDeviceExtension,
[in] PVOID ThreadContext,
[in] STOR_THREAD_PRIORITY Priority
);
View the official Windows Driver Kit DDI referenceNo description available.
StorPortSetPriorityThread sets the run-time priority of a miniport-created thread.
HwDeviceExtension [in]Pointer to the miniport's hardware device extension.
ThreadContext [in]Pointer to the thread context received in a prior call to StorPortCreateSystemThread.
Priority [in]A STOR_THREAD_PRIORITY enum value that specifies the thread priority to set.
StorPortSetPriorityThread returns one of the following values:
| Return code | Description |
|---|---|
| STOR_STATUS_SUCCESS | The specified thread priority was set successfully. |
| STOR_STATUS_INVALID_IRQL | IRQL level must equal PASSIVE_LEVEL. |
| STOR_STATUS_INVALID_PARAMETER | One or more of the provided parameters are invalid. |
| STOR_STATUS_UNSUCCESSFUL | Returned for other internal system reasons. |
A miniport can call StorPortSetPriorityThread to change the priority of the thread specified by ThreadContext.
Threads, whatever their respective run-time priorities, are run at IRQL = PASSIVE_LEVEL. See Thread Priorities for more information.
A miniport should specify a thread priority value that avoids run-time priority inversions. See Device-dedicated Threads for more information.