Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

You can set activity timer events in a device driver without overloading the CPU. Power Manager does not wait for the timer reset event while it waits for the timer to expire.

After the activity timer timeout, Power Manager checks whether the reset event was set during the interim. If the reset event has not been set, the timer is considered to have expired. If a reset event has been set, Power Manager resets the timeout and once again waits for the timer.

Power Manager updates the manual reset timer events only when the timer has expired with the reset event not signaled, or when the reset event is signaled for the first time after a period of inactivity.

The activity timer thread of Power Manager does not run if a driver thread runs at a higher priority. This is true even if Power Manager is actively waiting for the timer reset event.

By default, the activity timer thread runs at a level of THREAD_PRIORITY_ABOVE_NORMAL, whereas a majority of drivers run at THREAD_PRIORITY_HIGHEST or above. Therefore, the activity timer thread does not preempt the driver.

See Also

Concepts

Activity Timers