Why not just leave the thread alone? It ought not to touch the device if the
device is powered down, but you shouldn’t have to kill the thread. Why not
just let it wake up, look at the power state, not do anything and go back to
sleep.
=====================
Mark Roddy
-----Original Message-----
From: Olav [mailto:oa@ky8.org]
Sent: Tuesday, September 28, 2004 11:22 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Thread handling for device set power irp (PowerManagement)
Hi all,
I’m working on kernel mode drivers for pcmcia and usb devices. These drivers
use a thread, which most of the time is waiting in KeWaitForMultipleObjects
for one of several events to be signaled by timers.
What is the proper way to handle a thread when powering down?
Do I have to stop the thread when handling a device set power down irp?
I assume / expect that I have to stop the thread … But can I wait - in a
power irp - until the thread has exited?
(W. Oney, 2nd Edition, chapter 8 "Power Management, p. 432: “Power IRPs come
to you in the context of a system thread that you must not block.”)
Any comments / hints are welcome!
Thank you!
Kind regards
Olav
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to xxxxx@lists.osr.com