synccall signal handler need not handle dead threads anymore
authorRich Felker <dalias@aerifal.cx>
Fri, 26 Apr 2013 21:46:58 +0000 (17:46 -0400)
committerRich Felker <dalias@aerifal.cx>
Fri, 26 Apr 2013 21:46:58 +0000 (17:46 -0400)
they have already blocked signals before decrementing the thread
count, so the code being removed is unreachable in the case where the
thread is no longer counted.

src/thread/synccall.c

index 8c825ac..706c8e7 100644 (file)
@@ -21,15 +21,6 @@ static void handler(int sig, siginfo_t *si, void *ctx)
 
        sigqueue(self->pid, SIGSYNCCALL, (union sigval){0});
 
 
        sigqueue(self->pid, SIGSYNCCALL, (union sigval){0});
 
-       /* Threads which have already decremented themselves from the
-        * thread count must not act. Block further receipt of signals
-        * and return. */
-       if (self->dead) {
-               memset(&((ucontext_t *)ctx)->uc_sigmask, -1, 8);
-               errno = old_errno;
-               return;
-       }
-
        sem_init(&ch.sem, 0, 0);
        sem_init(&ch.sem2, 0, 0);
 
        sem_init(&ch.sem, 0, 0);
        sem_init(&ch.sem2, 0, 0);