mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 07:02:56 +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)
|
ExitThread(DWORD uExitCode)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
BOOLEAN LastThread;
|
ULONG LastThread;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Terminate process if this is the last thread
|
* Terminate process if this is the last thread
|
||||||
|
@ -251,7 +251,7 @@ ExitThread(DWORD uExitCode)
|
||||||
Status = NtQueryInformationThread(NtCurrentThread(),
|
Status = NtQueryInformationThread(NtCurrentThread(),
|
||||||
ThreadAmILastThread,
|
ThreadAmILastThread,
|
||||||
&LastThread,
|
&LastThread,
|
||||||
sizeof(BOOLEAN),
|
sizeof(LastThread),
|
||||||
NULL);
|
NULL);
|
||||||
if (NT_SUCCESS(Status) && LastThread)
|
if (NT_SUCCESS(Status) && LastThread)
|
||||||
{
|
{
|
||||||
|
@ -266,8 +266,9 @@ ExitThread(DWORD uExitCode)
|
||||||
NtCurrentTeb()->FreeStackOnTermination = TRUE;
|
NtCurrentTeb()->FreeStackOnTermination = TRUE;
|
||||||
NtTerminateThread(NULL, uExitCode);
|
NtTerminateThread(NULL, uExitCode);
|
||||||
|
|
||||||
/* We will never reach this place. This silences the compiler */
|
/* We should never reach this place */
|
||||||
ExitThread(uExitCode);
|
DPRINT1("It should not happen\n");
|
||||||
|
while (TRUE) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue