StorPortRequestTimer function (storport.h)

Schedules a callback event for a Storport timer context object.

Syntax

ULONG StorPortRequestTimer(
  [in]           PVOID        HwDeviceExtension,
  [in]           PVOID        TimerHandle,
  [in]           PHW_TIMER_EX TimerCallback,
  [in, optional] PVOID        CallbackContext,
  [in]           ULONGLONG    TimerValue,
  [in]           ULONGLONG    TolerableDelay
);

Parameters

[in] HwDeviceExtension

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

[in] TimerHandle

A pointer to an opaque buffer for the timer context returned by StorPortInitializeTimer.

[in] TimerCallback

A pointer to a timer callback routine supplied by the miniport. The following is the prototype defined for PHW_TIMER_EX:

typedef
VOID
(*PHW_TIMER_EX) (
  _In_ PVOID  DeviceExtension,
  _In_opt_ PVOID Context
  );

[in, optional] CallbackContext

A pointer to a miniport provided context for the timer callback.

[in] TimerValue

The timeout value for the timer, in microseconds. Setting TimerValue to 0 will cancel the timer.

[in] TolerableDelay

The allowable delay for the timer in microseconds. Values less than 32 microseconds are ignored and TolerableDelay defaults to 0.

Return value

The StorPortRequestTimer routine returns one of these status codes:

Return code Description
STOR_STATUS_INSUFFICIENT_RESOURCES
Not enough resources available to defer scheduling of the timer.
STOR_STATUS_INVALID_PARAMETER
HwDeviceExtension, TimerHandle, or TimerCallback is NULL.

The timer context object, TimerHandle, is invalid.

STOR_STATUS_BUSY
A previous timer request is active. TimerValue > 0 and TimerCallback has not been called.
STOR_STATUS_SUCCESS
The timer request was successfully scheduled.

Remarks

The StorPortRequestTimer routine is callable at any IRQL. However, if the routine is called when IRQL > DISPATCH_LEVEL, the timer's scheduling is deferred until IRQL <= DISPATCH_LEVEL.

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 Any

See also

HwStorTimer

StorPortFreeTimer

StorPortInitializeTimer

StorPortNotification