StorPortRequestTimer function

Schedules a callback event for a Storport timer context object.

Syntax

ULONG StorPortRequestTimer(
  PVOID        HwDeviceExtension,
  PVOID        TimerHandle,
  PHW_TIMER_EX TimerCallback,
  PVOID        CallbackContext,
  ULONGLONG    TimerValue,
  ULONGLONG    TolerableDelay
);

Parameters

HwDeviceExtension

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

TimerHandle

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

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
  );

CallbackContext

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

TimerValue

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

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

   
Windows version 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