Sunday, January 29, 2006

Waiting for another event in IST (Interrupt Service Thread)

I had a requirement to execute same code as in the IST function of a driver but when a different event is triggered elsewhere in the system. I tried to use WaitForMultipleObjects function for the new event along with the IST event in an array but it failed. Documentation says that only WaitForSingleObject function can be used to wait for the event that is triggered by the kernel. While looking for more information on the topic, I found this article by Mike Hall. It says that Windows CE has this restriction to ensure the upper bound on the time to trigger the event and time to release the IST. IST latency is thus guaranteed.

I solved this problem by creating another thread before IST function gets executed. The new thread has a WaitForSingleObject call to wait for the new event to get signalled. As soon as this new event is signalled, partial copy of the original IST code runs which is what I wanted.

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?