- Use TIF in cleanup flag.

svn path=/trunk/; revision=43276
This commit is contained in:
James Tabor 2009-10-03 23:39:30 +00:00
parent 6ad0121a58
commit a466f21e52
3 changed files with 3 additions and 4 deletions

View file

@ -264,7 +264,7 @@ Win32kThreadCallback(struct _ETHREAD *Thread,
}
}
}
Win32Thread->IsExiting = FALSE;
Win32Thread->TIF_flags &= ~TIF_INCLEANUP;
co_IntDestroyCaret(Win32Thread);
Win32Thread->ppi = PsGetCurrentProcessWin32Process();
pTeb = NtCurrentTeb();
@ -283,7 +283,6 @@ Win32kThreadCallback(struct _ETHREAD *Thread,
DPRINT("Destroying W32 thread TID:%d at IRQ level: %lu\n", Thread->Cid.UniqueThread, KeGetCurrentIrql());
Win32Thread->IsExiting = TRUE;
Win32Thread->TIF_flags |= TIF_INCLEANUP;
HOOK_DestroyThreadHooks(Thread);
UnregisterThreadHotKeys(Thread);

View file

@ -1008,7 +1008,7 @@ IntBlockInput(PTHREADINFO W32Thread, BOOL BlockIt)
PTHREADINFO OldBlock;
ASSERT(W32Thread);
if(!W32Thread->Desktop || (W32Thread->IsExiting && BlockIt))
if(!W32Thread->Desktop || ((W32Thread->TIF_flags & TIF_INCLEANUP) && BlockIt))
{
/*
* fail blocking if exiting the thread

View file

@ -1513,7 +1513,7 @@ co_IntSendMessageTimeoutSingle(HWND hWnd,
if (NULL != Win32Thread &&
Window->MessageQueue == Win32Thread->MessageQueue)
{
if (Win32Thread->IsExiting)
if (Win32Thread->TIF_flags & TIF_INCLEANUP)
{
/* Never send messages to exiting threads */
RETURN( FALSE);