mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
ntdll: Store the exit code in the server in RtlExitUserThread.
This commit is contained in:
parent
21453b4c2e
commit
74cdb539a4
2 changed files with 24 additions and 23 deletions
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue