Alexandre Julliard : ntdll: Store the exit code in the server in RtlExitUserThread.
Alexandre Julliard
julliard at winehq.org
Thu Oct 30 10:10:20 CDT 2008
Module: wine
Branch: master
Commit: 74cdb539a4b2e50d169d37b35d0cc9ecc1b2e7bd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=74cdb539a4b2e50d169d37b35d0cc9ecc1b2e7bd
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Oct 29 20:37:43 2008 +0100
ntdll: Store the exit code in the server in RtlExitUserThread.
---
dlls/kernel32/thread.c | 23 ++---------------------
dlls/ntdll/thread.c | 24 ++++++++++++++++++++++--
2 files changed, 24 insertions(+), 23 deletions(-)
diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c
index bddeba7..b5a3708 100644
--- a/dlls/kernel32/thread.c
+++ b/dlls/kernel32/thread.c
@@ -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 );
}
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 47e0196..db126bb 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -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 );
+ }
}
More information about the wine-cvs
mailing list