Author: fireball
Date: Tue Apr 6 23:30:29 2010
New Revision: 46755
URL:
http://svn.reactos.org/svn/reactos?rev=46755&view=rev
Log:
- Add thread termination cleanup (destroying windows, freeing a message queue,
dereferencing its desktop).
Modified:
branches/arwinss/reactos/subsystems/win32/win32k/main/init.c
Modified: branches/arwinss/reactos/subsystems/win32/win32k/main/init.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/main/init.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/main/init.c [iso-8859-1] Tue Apr 6
23:30:29 2010
@@ -153,6 +153,15 @@
else
{
DPRINT("Destroying W32 thread TID:%d at IRQ level: %lu\n",
Thread->Tcb.Teb->ClientId.UniqueThread, KeGetCurrentIrql());
+
+ /* USER thread-level cleanup */
+ UserEnterExclusive();
+ //cleanup_clipboard_thread();
+ destroy_thread_windows(Win32Thread);
+ free_msg_queue(Win32Thread);
+ close_thread_desktop(Win32Thread);
+ UserLeave();
+
PsSetThreadWin32Thread(Thread, NULL);
}