I am writing a WDM driver, running on Windows 2000.
I have a watchdog timer function, initialized with “IoInitializeTimer()”
and started with “IoStartTimer()”
The watchdog only does one thing, it schedules an “IO_WORKITEM” with
“IoQueueWorkItem()”, so that I can have a watchdog_passive function running
at IRQL PASSIVE_LEVEL. The “IO_WORKITEM” was properly allocated and
initialized with “IoAllocateWorkItem()” before the watchdog timer starts.
Everything works fine on the system, I can start and stop the driver, the
functions execute as I expect. There is a problem on boot up however. I get
a blue screen with the message “INVALID_WORK_QUEUE_ITEM”. I have read the
explanation in the KB article Q103059, and I don’t think that it explains
my case at all.
To debug the problem I added a boolean to make sure that I don’t add the
IO_WORKITEM to the queue many times. I also added a counter and it turns
out that the watchdog function is called 5 times before the
watchdog_passive function is called (this is not surprising at boot up,
many other things are happening at a higher IRQ level). I don’t see why I
should get a blue screen for scheduling the IO_WORKITEM to run many times
though, you would think that the OS could manage the queue.
I’m wondering if anyone else has had this problem, and if this is the way
that the work queues are intended to function. Is this the way that I
should be scheduling a passive watchdog function?
Thanks,
Doug
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com