- Check that the thread is not in cleanup before attempting to do anything related to it. Add a couple asserts for sanity.

svn path=/trunk/; revision=47249
This commit is contained in:
Michael Martin 2010-05-17 00:01:26 +00:00
parent 39c39d457f
commit 6666b6b68b

View file

@ -368,7 +368,8 @@ ProcessTimers(VOID)
{
if (pTmr->cmsCountdown < 0)
{
if (!(pTmr->flags & TMRF_READY))
ASSERT(pTmr->pti);
if ((!(pTmr->flags & TMRF_READY)) && (!(pTmr->pti->TIF_flags & TIF_INCLEANUP)))
{
if (pTmr->flags & TMRF_ONESHOT)
pTmr->flags |= TMRF_WAITING;
@ -384,8 +385,8 @@ ProcessTimers(VOID)
// Set thread message queue for this timer.
if (pTmr->pti->MessageQueue)
{ // Wakeup thread
if (pTmr->pti->MessageQueue->WakeMask & QS_POSTMESSAGE)
KeSetEvent(pTmr->pti->MessageQueue->NewMessages, IO_NO_INCREMENT, FALSE);
ASSERT(pTmr->pti->MessageQueue->NewMessages != NULL);
KeSetEvent(pTmr->pti->MessageQueue->NewMessages, IO_NO_INCREMENT, FALSE);
}
}
}