Author: dgorbachev Date: Sat Jan 2 00:14:10 2010 New Revision: 44864
URL: http://svn.reactos.org/svn/reactos?rev=44864&view=rev Log: Fix parameter type of NtQueryInformationThread; do not call ExitThread from itself. Bug #5076.
Modified: trunk/reactos/dll/win32/kernel32/thread/thread.c
Modified: trunk/reactos/dll/win32/kernel32/thread/thread.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/thread/t... ============================================================================== --- trunk/reactos/dll/win32/kernel32/thread/thread.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/thread/thread.c [iso-8859-1] Sat Jan 2 00:14:10 2010 @@ -242,7 +242,7 @@ ExitThread(DWORD uExitCode) { NTSTATUS Status; - BOOLEAN LastThread; + ULONG LastThread;
/* * Terminate process if this is the last thread @@ -251,7 +251,7 @@ Status = NtQueryInformationThread(NtCurrentThread(), ThreadAmILastThread, &LastThread, - sizeof(BOOLEAN), + sizeof(LastThread), NULL); if (NT_SUCCESS(Status) && LastThread) { @@ -266,8 +266,9 @@ NtCurrentTeb()->FreeStackOnTermination = TRUE; NtTerminateThread(NULL, uExitCode);
- /* We will never reach this place. This silences the compiler */ - ExitThread(uExitCode); + /* We should never reach this place */ + DPRINT1("It should not happen\n"); + while (TRUE) ; }
/*