@@ -3976,16 +3976,16 @@ TerminateChildren(int signal)
3976
3976
}
3977
3977
3978
3978
static ThreadContext * terminated_queue ;
3979
- static pthread_mutex_t teminated_queue_mutex = PTHREAD_MUTEX_INITIALIZER ;
3979
+ static pthread_mutex_t terminated_queue_mutex = PTHREAD_MUTEX_INITIALIZER ;
3980
3980
3981
3981
static ThreadContext * get_terminated_thread ()
3982
3982
{
3983
3983
ThreadContext * tc ;
3984
- pthread_mutex_lock (& teminated_queue_mutex );
3984
+ pthread_mutex_lock (& terminated_queue_mutex );
3985
3985
tc = terminated_queue ;
3986
3986
if (tc != NULL )
3987
3987
terminated_queue = tc -> next ;
3988
- pthread_mutex_unlock (& teminated_queue_mutex );
3988
+ pthread_mutex_unlock (& terminated_queue_mutex );
3989
3989
return tc ;
3990
3990
}
3991
3991
@@ -4001,10 +4001,10 @@ static void thread_cleanup(void* arg)
4001
4001
MemoryContextReset (TopMemoryContext );
4002
4002
free (TopMemoryContext );
4003
4003
4004
- pthread_mutex_lock (& teminated_queue_mutex );
4004
+ pthread_mutex_lock (& terminated_queue_mutex );
4005
4005
ctx -> next = terminated_queue ;
4006
4006
terminated_queue = ctx ;
4007
- pthread_mutex_unlock (& teminated_queue_mutex );
4007
+ pthread_mutex_unlock (& terminated_queue_mutex );
4008
4008
elog (DEBUG1 ,"Thread %ld is terminated" ,ctx -> tid );
4009
4009
Assert (PostmasterPid != 0 );
4010
4010
rc = pthread_kill (PostmasterPid ,SIGUSR1 );
@@ -4814,13 +4814,13 @@ static void sigusr1_handler(SIGNAL_ARGS)
4814
4814
4815
4815
elog (DEBUG2 ,"postmaster_sigusr1_handler" );
4816
4816
4817
+ PG_SETMASK (& BlockSig );
4818
+
4817
4819
while ((tc = get_terminated_thread ())!= NULL )
4818
4820
{
4819
4821
reaper (tc );
4820
4822
}
4821
4823
4822
- PG_SETMASK (& BlockSig );
4823
-
4824
4824
/* Process background worker state change. */
4825
4825
if (CheckPostmasterSignal (PMSIGNAL_BACKGROUND_WORKER_CHANGE ))
4826
4826
{