Commit 74cdb539 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Store the exit code in the server in RtlExitUserThread.

parent 21453b4c
......@@ -152,27 +152,8 @@ HANDLE WINAPI OpenThread( DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwTh
*/
void WINAPI ExitThread( DWORD code ) /* [in] Exit code for this thread */
{
BOOL last;
SERVER_START_REQ( terminate_thread )
{
/* send the exit code to the server */
req->handle = GetCurrentThread();
req->exit_code = code;
wine_server_call( req );
last = reply->last;
}
SERVER_END_REQ;
if (last)
{
LdrShutdownProcess();
exit( code );
}
else
{
RtlFreeThreadActivationContextStack();
RtlExitUserThread( code );
}
RtlFreeThreadActivationContextStack();
RtlExitUserThread( code );
}
......
......@@ -604,8 +604,28 @@ error:
*/
void WINAPI RtlExitUserThread( ULONG status )
{
LdrShutdownThread();
server_exit_thread( status );
BOOL last;
SERVER_START_REQ( terminate_thread )
{
/* send the exit code to the server */
req->handle = GetCurrentThread();
req->exit_code = status;
wine_server_call( req );
last = reply->last;
}
SERVER_END_REQ;
if (last)
{
LdrShutdownProcess();
exit( status );
}
else
{
LdrShutdownThread();
server_exit_thread( status );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment