ntdll: Decrement thread count from exit_thread and exit the process if needed.

This commit is contained in:
Tim Clem 2023-04-24 11:51:31 -07:00 committed by Alexandre Julliard
parent f88affa2a1
commit fac1aabbef

View file

@ -1429,6 +1429,8 @@ static DECLSPEC_NORETURN void exit_thread( int status )
pthread_sigmask( SIG_BLOCK, &server_block_set, NULL );
if (InterlockedDecrement( &nb_threads ) <= 0) exit_process( status );
if ((teb = InterlockedExchangePointer( &prev_teb, NtCurrentTeb() )))
{
struct ntdll_thread_data *thread_data = (struct ntdll_thread_data *)&teb->GdiTebBatch;