Timer Objects and DPCs
Any driver can use a timer object within a nonarbitrary thread context to time out operations within the driver's other routines, or to perform a periodic operation. A driver calls KeInitializeTimer or KeInitializeTimerEx to set up a timer object.
A timer can be set to expire just once, or to expire repeatedly after a given interval. KeSetTimer always sets a timer that will expire just once. KeSetTimerEx accepts an optional Period parameter, which specifies a recurring timer interval.
An optional CustomTimerDpc routine (a type of deferred procedure call) can be associated with either a notification timer or a synchronization timer. This routine executes when the specified time interval expires. For more information, see Using Timer Objects.
A timer can be a notification timer or a synchronization timer.
When a notification timer is signaled, all waiting threads have their wait satisfied. The state of the timer remains signaled until it is explicitly reset.
When a synchronization timer expires, its state is set to Signaled until a single waiting thread is released. Then the timer is reset to the Not-Signaled state.
KeInitializeTimer always creates notification timers. KeInitializeTimerEx accepts a Type parameter, which can be NotificationTimer or SynchronizationTimer.
This section contains the following topics, which provide more information about timer objects and DPCs:
Build date: 5/22/2013