Fix parameter type of NtQueryInformationThread; do not call ExitThread from itself. Bug #5076.

svn path=/trunk/; revision=44864
This commit is contained in:
Dmitry Gorbachev 2010-01-01 23:14:10 +00:00
parent 126c7209ac
commit 756859265d

View file

@ -242,7 +242,7 @@ WINAPI
ExitThread(DWORD uExitCode)
{
NTSTATUS Status;
BOOLEAN LastThread;
ULONG LastThread;
/*
* Terminate process if this is the last thread
@ -251,7 +251,7 @@ ExitThread(DWORD uExitCode)
Status = NtQueryInformationThread(NtCurrentThread(),
ThreadAmILastThread,
&LastThread,
sizeof(BOOLEAN),
sizeof(LastThread),
NULL);
if (NT_SUCCESS(Status) && LastThread)
{
@ -266,8 +266,9 @@ ExitThread(DWORD uExitCode)
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) ;
}
/*