StorPortSetPriorityThread function (storport.h)

StorPortSetPriorityThread sets the run-time priority of a miniport-created thread.

Syntax

ULONG StorPortSetPriorityThread(
  [in] PVOID                HwDeviceExtension,
  [in] PVOID                ThreadContext,
  [in] STOR_THREAD_PRIORITY Priority
);

Parameters

[in] HwDeviceExtension

Pointer to the miniport's hardware device extension.

[in] ThreadContext

Pointer to the thread context received in a prior call to StorPortCreateSystemThread.

[in] Priority

A STOR_THREAD_PRIORITY enum value that specifies the thread priority to set.

Return value

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.

Remarks

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.

Requirements

Requirement Value
Minimum supported server Windows Server 2022
Header storport.h

See also

STOR_THREAD_PRIORITY

StorPortCreateSystemThread