mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 10:01:43 +00:00
Fix parameter type of NtQueryInformationThread; do not call ExitThread from itself. Bug #5076.
svn path=/trunk/; revision=44864
This commit is contained in:
parent
126c7209ac
commit
756859265d
1 changed files with 5 additions and 4 deletions
|
@ -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) ;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue