Expand Minimize

KeInitializeTimerEx routine

The KeInitializeTimerEx routine initializes an extended kernel timer object.

Syntax


VOID KeInitializeTimerEx(
  _Out_  PKTIMER Timer,
  _In_   TIMER_TYPE Type
);

Parameters

Timer [out]

Pointer to a timer object, for which the caller provides the storage.

Type [in]

Specifies the type of the timer object, either NotificationTimer or SynchronizationTimer.

Return value

None

Remarks

The timer object is initialized to a not-signaled state.

Storage for a timer object must be resident: in the device extension of a driver-created device object, in the controller extension of a driver-created controller object, or in nonpaged pool allocated by the caller.

When a notification timer expires, all waiting threads are released and the timer remains in the signaled state until it is explicitly reset. When a synchronization timer expires, it is set to a signaled state until a single waiting thread is released and then the timer is reset to a not-signaled state.

Callers of KeInitializeTimerEx should be running at IRQL = DISPATCH_LEVEL or lower. It is best to initialize timers at IRQL = PASSIVE_LEVEL.

For more information about timer objects, see Timer Objects and DPCs.

Use KeSetTimer or KeSetTimerEx to define when the timer will expire.

Requirements

Version

Available starting with Windows 2000.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

<= DISPATCH_LEVEL (see Remarks section)

DDI compliance rules

IrqlKeDispatchLte, HwStorPortProhibitedDDIs

See also

KeCancelTimer
KeReadStateTimer
KeSetTimer
KeSetTimerEx
KeWaitForMultipleObjects
KeWaitForSingleObject

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft