Commit 8101a2fa authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Move the abort_thread() function to the CPU-specific files to allow redefining it.

parent 28e34588
......@@ -79,6 +79,7 @@ extern size_t server_init_thread( void *entry_point );
extern void DECLSPEC_NORETURN server_protocol_error( const char *err, ... );
extern void DECLSPEC_NORETURN server_protocol_perror( const char *err );
extern void DECLSPEC_NORETURN abort_thread( int status );
extern void DECLSPEC_NORETURN terminate_thread( int status );
extern void DECLSPEC_NORETURN exit_thread( int status );
extern sigset_t server_block_set;
extern void server_enter_uninterrupted_section( RTL_CRITICAL_SECTION *cs, sigset_t *sigset );
......
......@@ -2321,6 +2321,14 @@ void WINAPI RtlExitUserThread( ULONG status )
exit_thread( status );
}
/***********************************************************************
* abort_thread
*/
void abort_thread( int status )
{
terminate_thread( status );
}
/**********************************************************************
* DbgBreakPoint (NTDLL.@)
*/
......
......@@ -1111,6 +1111,14 @@ void WINAPI RtlExitUserThread( ULONG status )
exit_thread( status );
}
/***********************************************************************
* abort_thread
*/
void abort_thread( int status )
{
terminate_thread( status );
}
/**********************************************************************
* DbgBreakPoint (NTDLL.@)
*/
......
......@@ -853,6 +853,14 @@ void WINAPI RtlExitUserThread( ULONG status )
exit_thread( status );
}
/***********************************************************************
* abort_thread
*/
void abort_thread( int status )
{
terminate_thread( status );
}
/**********************************************************************
* DbgBreakPoint (NTDLL.@)
*/
......
......@@ -2578,6 +2578,13 @@ void WINAPI RtlExitUserThread( ULONG status )
exit_thread( status );
}
/***********************************************************************
* abort_thread
*/
void abort_thread( int status )
{
terminate_thread( status );
}
/**********************************************************************
* __wine_enter_vm86 (NTDLL.@)
......
......@@ -364,9 +364,9 @@ HANDLE thread_init(void)
/***********************************************************************
* abort_thread
* terminate_thread
*/
void abort_thread( int status )
void terminate_thread( int status )
{
pthread_sigmask( SIG_BLOCK, &server_block_set, NULL );
if (interlocked_xchg_add( &nb_threads, -1 ) <= 1) _exit( status );
......@@ -698,7 +698,7 @@ NTSTATUS WINAPI NtAlertThread( HANDLE handle )
NTSTATUS WINAPI NtTerminateThread( HANDLE handle, LONG exit_code )
{
NTSTATUS ret;
BOOL self, last;
BOOL self;
SERVER_START_REQ( terminate_thread )
{
......@@ -706,15 +706,10 @@ NTSTATUS WINAPI NtTerminateThread( HANDLE handle, LONG exit_code )
req->exit_code = exit_code;
ret = wine_server_call( req );
self = !ret && reply->self;
last = reply->last;
}
SERVER_END_REQ;
if (self)
{
if (last) _exit( exit_code );
else abort_thread( exit_code );
}
if (self) abort_thread( exit_code );
return ret;
}
......
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