Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libpthread Correct the order of arguments to __sigplusse...



details:   https://anonhg.NetBSD.org/src/rev/3208e364de9c
branches:  trunk
changeset: 574398:3208e364de9c
user:      nathanw <nathanw%NetBSD.org@localhost>
date:      Sun Feb 27 18:25:01 2005 +0000

description:
Correct the order of arguments to __sigplusset() in two places to correct
the signal mask experienced by signal handlers in threaded programs.
Fixes regress/lib/libpthread/sigmask3.

diffstat:

 lib/libpthread/pthread_sig.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 5acfd376199f -r 3208e364de9c lib/libpthread/pthread_sig.c
--- a/lib/libpthread/pthread_sig.c      Sun Feb 27 18:24:49 2005 +0000
+++ b/lib/libpthread/pthread_sig.c      Sun Feb 27 18:25:01 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pthread_sig.c,v 1.38 2005/02/26 20:33:06 nathanw Exp $ */
+/*     $NetBSD: pthread_sig.c,v 1.39 2005/02/27 18:25:02 nathanw Exp $ */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_sig.c,v 1.38 2005/02/26 20:33:06 nathanw Exp $");
+__RCSID("$NetBSD: pthread_sig.c,v 1.39 2005/02/27 18:25:02 nathanw Exp $");
 
 /* We're interposing a specific version of the signal interface. */
 #define        __LIBC12_SOURCE__
@@ -771,7 +771,7 @@
        SDPRINTF(("(pthread__kill_self %p) sig %d\n", self, si->si_signo));
 
        oldmask = self->pt_sigmask;
-       __sigplusset(&self->pt_sigmask, &act.sa_mask);
+       __sigplusset(&act.sa_mask, &self->pt_sigmask);
        if ((act.sa_flags & SA_NODEFER) == 0)
                __sigaddset14(&self->pt_sigmask, si->si_signo);
 
@@ -883,7 +883,7 @@
         * more instances of this signal.
         */
        olduc->uc_sigmask = target->pt_sigmask;
-       __sigplusset(&target->pt_sigmask, &act.sa_mask);
+       __sigplusset(&act.sa_mask, &target->pt_sigmask);
        if ((act.sa_flags & SA_NODEFER) == 0)
                __sigaddset14(&target->pt_sigmask, si->si_signo);
 



Home | Main Index | Thread Index | Old Index