From patchwork Fri Mar 13 19:48:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 38559 X-Patchwork-Delegate: azanella@linux.vnet.ibm.com Return-Path: X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com [IPv6:2607:f8b0:4864:20::f44]) by sourceware.org (Postfix) with ESMTPS id 048AD3AAA057 for ; Fri, 13 Mar 2020 19:48:35 +0000 (GMT) Received: by mail-qv1-xf44.google.com with SMTP id a10so5280131qvq.8 for ; Fri, 13 Mar 2020 12:48:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=Y/j51PyZo1QyU9ZjFmXdsJhxOJLzIoLVgzNo8h8U5JE=; b=Y9yWSyrzP5vwtWPU3PJUjfC15QlsaZx3nLjLBmWOnxEpy9bNyBb7g36WRgrVrd+r4B TfU16TWaU9FbBiWam1+9UAlyVWlrXclMfxwXKuoN+gjHVPdvbqUv3IcvZwBettOWUkuF L3rENnGjcfl3hl3X4gXBI6iI8utlniofJ8+f5YGAmIzK8h8cZVIhpFWFxXMzHQO+E0VV ZYspn1TnI06MFqr6NQR54bZD5Gd0ZgszM/lt7zZ8XxTF3EPn3ro34LJg9yqPOvcKQeAL aSg6GT5DmUpF9OTsggQDD+8yJuMA9Lsmr9y2OQwkeI9s+G6Dm3qMw+xssyjeb0/l43MS AlBQ== X-Gm-Message-State: ANhLgQ0kdxN1PmeUss+EklEcMn3LxwPTR1789TKCY8BVY1Pb6sYl+vxF mu0g6xQb+Ij1kImCuygbhAPBLavh8ZY= X-Google-Smtp-Source: ADFU+vtT8+HgnNemY/4ZtEduvS7jpJPdHYqqh6TTbIfWzVCYjolq6szIIzD/ofosGoHx5P+l0NtBAA== X-Received: by 2002:a0c:e450:: with SMTP id d16mr14284167qvm.195.1584128912243; Fri, 13 Mar 2020 12:48:32 -0700 (PDT) Received: from localhost.localdomain ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id r10sm29497900qkm.23.2020.03.13.12.48.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2020 12:48:31 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH v2 1/4] nptl: Move pthread_sigmask implementation to libc Date: Fri, 13 Mar 2020 16:48:24 -0300 Message-Id: <20200313194827.4467-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-25.2 required=5.0 tests=DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2020 19:48:37 -0000 Changes from previous version: - Added a new libc.so version for pthread_sigmask. - Move ia64 changes to its own patch. --- This is part of the libpthread removal project: A new symbol version is added on libc to force loading failure instead of lazy binding one for newly binaries with old loaders. Checked with a build against all affected ABIs. --- nptl/Makefile | 3 ++- nptl/Versions | 4 ++++ nptl/libpthread-compat.c | 6 ++++++ nptl/pthreadP.h | 2 ++ nptl/pthread_sigmask.c | 10 +++++++--- sysdeps/unix/sysv/linux/aarch64/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/aarch64/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/alpha/Makefile | 6 +++--- sysdeps/unix/sysv/linux/alpha/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/alpha/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/arm/be/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/arm/be/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/arm/le/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/arm/le/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/csky/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/csky/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/hppa/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/hppa/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/i386/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/i386/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/ia64/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/ia64/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist | 2 ++ .../unix/sysv/linux/m68k/coldfire/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/microblaze/be/libc.abilist | 2 ++ .../unix/sysv/linux/microblaze/be/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/microblaze/le/libc.abilist | 2 ++ .../unix/sysv/linux/microblaze/le/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/nios2/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/nios2/libpthread.abilist | 1 - .../unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist | 2 ++ .../sysv/linux/powerpc/powerpc32/libpthread.abilist | 1 - .../unix/sysv/linux/powerpc/powerpc64/be/libc.abilist | 2 ++ .../sysv/linux/powerpc/powerpc64/be/libpthread.abilist | 1 - .../unix/sysv/linux/powerpc/powerpc64/le/libc.abilist | 2 ++ .../sysv/linux/powerpc/powerpc64/le/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist | 2 ++ .../unix/sysv/linux/s390/s390-32/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist | 2 ++ .../unix/sysv/linux/s390/s390-64/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/sh/be/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/sh/be/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/sh/le/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/sh/le/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist | 2 ++ .../unix/sysv/linux/sparc/sparc32/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist | 2 ++ .../unix/sysv/linux/sparc/sparc64/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/x86_64/64/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist | 1 - 62 files changed, 82 insertions(+), 34 deletions(-) diff --git a/nptl/Makefile b/nptl/Makefile index e554a3898d..4816fa254e 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -59,6 +59,7 @@ routines = \ pthread_getschedparam \ pthread_self \ pthread_setschedparam \ + pthread_sigmask \ register-atfork \ shared-only-routines = forward @@ -123,7 +124,7 @@ libpthread-routines = nptl-init nptlfreeres vars events version pt-interp \ pthread_barrierattr_setpshared \ pthread_key_create pthread_key_delete \ pthread_getspecific pthread_setspecific \ - pthread_sigmask pthread_kill pthread_sigqueue \ + pthread_kill pthread_sigqueue \ pthread_cancel pthread_testcancel \ pthread_setcancelstate pthread_setcanceltype \ pthread_once \ diff --git a/nptl/Versions b/nptl/Versions index 543dddc4ee..f7140277f5 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -16,6 +16,7 @@ libc { pthread_mutex_lock; pthread_mutex_unlock; pthread_self; pthread_setcancelstate; pthread_setcanceltype; + pthread_sigmask; } GLIBC_2.1 { pthread_attr_init; @@ -32,6 +33,9 @@ libc { GLIBC_2.28 { thrd_current; thrd_equal; thrd_sleep; thrd_yield; } + GLIBC_2.32 { + pthread_sigmask; + } GLIBC_PRIVATE { __libc_alloca_cutoff; # Internal libc interface to libpthread diff --git a/nptl/libpthread-compat.c b/nptl/libpthread-compat.c index 512b4c77c8..92c981c2d2 100644 --- a/nptl/libpthread-compat.c +++ b/nptl/libpthread-compat.c @@ -36,6 +36,12 @@ __libpthread_version_placeholder (void) version or later, the placeholder symbol is not needed because there are plenty of other symbols which populate those later versions. */ + +#if (SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1)) +compat_symbol_unique (libpthread, + __libpthread_version_placeholder, GLIBC_2_0); +#endif + #if (SHLIB_COMPAT (libpthread, GLIBC_2_1_2, GLIBC_2_2)) compat_symbol_unique (libpthread, __libpthread_version_placeholder, GLIBC_2_1_2); diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index 06fb0d74c5..edec8d0501 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -482,6 +482,8 @@ extern void __pthread_testcancel (void); extern int __pthread_clockjoin_ex (pthread_t, void **, clockid_t, const struct timespec *, bool) attribute_hidden; +extern int __pthread_sigmask (int how, const sigset_t *newmask, + sigset_t *oldmask); #if IS_IN (libpthread) diff --git a/nptl/pthread_sigmask.c b/nptl/pthread_sigmask.c index c7860e02a5..0e326d610c 100644 --- a/nptl/pthread_sigmask.c +++ b/nptl/pthread_sigmask.c @@ -16,14 +16,13 @@ License along with the GNU C Library; if not, see . */ -#include #include #include #include - +#include int -pthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask) +__pthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask) { sigset_t local_newmask; @@ -47,3 +46,8 @@ pthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask) ? INTERNAL_SYSCALL_ERRNO (result) : 0); } +versioned_symbol (libc, __pthread_sigmask, pthread_sigmask, GLIBC_2_32); +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_32) +strong_alias (__pthread_sigmask, __pthread_sigmask_2); +compat_symbol (libc, __pthread_sigmask_2, pthread_sigmask, GLIBC_2_0); +#endif diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist index a4c31932cb..41bb214bb9 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist @@ -1447,6 +1447,7 @@ GLIBC_2.17 pthread_self F GLIBC_2.17 pthread_setcancelstate F GLIBC_2.17 pthread_setcanceltype F GLIBC_2.17 pthread_setschedparam F +GLIBC_2.17 pthread_sigmask F GLIBC_2.17 ptrace F GLIBC_2.17 ptsname F GLIBC_2.17 ptsname_r F @@ -2145,3 +2146,4 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist index d65beba958..48b368acb1 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist @@ -156,7 +156,6 @@ GLIBC_2.17 pthread_setconcurrency F GLIBC_2.17 pthread_setname_np F GLIBC_2.17 pthread_setschedprio F GLIBC_2.17 pthread_setspecific F -GLIBC_2.17 pthread_sigmask F GLIBC_2.17 pthread_sigqueue F GLIBC_2.17 pthread_spin_destroy F GLIBC_2.17 pthread_spin_init F diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index 2e132e474b..92484bbe65 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -31,9 +31,9 @@ libm-routines += multc3 divtc3 endif # math ifeq ($(subdir),nptl) -# pull in __syscall_error routine, __sigprocmask, sigaction stubs. -libpthread-routines += sysdep sigprocmask rt_sigaction -libpthread-shared-only-routines += sysdep sigprocmask rt_sigaction +# pull in __syscall_error routine, sigaction stubs. +libpthread-routines += sysdep rt_sigaction +libpthread-shared-only-routines += sysdep rt_sigaction endif ifeq ($(subdir),conform) diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist index e7f2174ac2..6430af207f 100644 --- a/sysdeps/unix/sysv/linux/alpha/libc.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist @@ -891,6 +891,7 @@ GLIBC_2.0 pthread_self F GLIBC_2.0 pthread_setcancelstate F GLIBC_2.0 pthread_setcanceltype F GLIBC_2.0 pthread_setschedparam F +GLIBC_2.0 pthread_sigmask F GLIBC_2.0 ptrace F GLIBC_2.0 putc F GLIBC_2.0 putc_unlocked F @@ -2225,6 +2226,7 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 _IO_fprintf F GLIBC_2.4 _IO_printf F GLIBC_2.4 _IO_sprintf F diff --git a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist index ffd443422d..cfffc5f529 100644 --- a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist @@ -71,7 +71,6 @@ GLIBC_2.0 pthread_once F GLIBC_2.0 pthread_setcancelstate F GLIBC_2.0 pthread_setcanceltype F GLIBC_2.0 pthread_setspecific F -GLIBC_2.0 pthread_sigmask F GLIBC_2.0 pthread_testcancel F GLIBC_2.0 raise F GLIBC_2.0 read F diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist index b152c0e24a..f4ea1756d5 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist @@ -133,6 +133,7 @@ GLIBC_2.30 twalk_r F GLIBC_2.31 msgctl F GLIBC_2.31 semctl F GLIBC_2.31 shmctl F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 _Exit F GLIBC_2.4 _IO_2_1_stderr_ D 0xa0 GLIBC_2.4 _IO_2_1_stdin_ D 0xa0 @@ -1517,6 +1518,7 @@ GLIBC_2.4 pthread_self F GLIBC_2.4 pthread_setcancelstate F GLIBC_2.4 pthread_setcanceltype F GLIBC_2.4 pthread_setschedparam F +GLIBC_2.4 pthread_sigmask F GLIBC_2.4 ptrace F GLIBC_2.4 ptsname F GLIBC_2.4 ptsname_r F diff --git a/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist index 129c64b0a7..050e799de8 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist @@ -186,7 +186,6 @@ GLIBC_2.4 pthread_setcanceltype F GLIBC_2.4 pthread_setconcurrency F GLIBC_2.4 pthread_setschedprio F GLIBC_2.4 pthread_setspecific F -GLIBC_2.4 pthread_sigmask F GLIBC_2.4 pthread_spin_destroy F GLIBC_2.4 pthread_spin_init F GLIBC_2.4 pthread_spin_lock F diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist index 9371927927..f1456b26b2 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist @@ -130,6 +130,7 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 _Exit F GLIBC_2.4 _IO_2_1_stderr_ D 0xa0 GLIBC_2.4 _IO_2_1_stdin_ D 0xa0 @@ -1514,6 +1515,7 @@ GLIBC_2.4 pthread_self F GLIBC_2.4 pthread_setcancelstate F GLIBC_2.4 pthread_setcanceltype F GLIBC_2.4 pthread_setschedparam F +GLIBC_2.4 pthread_sigmask F GLIBC_2.4 ptrace F GLIBC_2.4 ptsname F GLIBC_2.4 ptsname_r F diff --git a/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist index 129c64b0a7..050e799de8 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist @@ -186,7 +186,6 @@ GLIBC_2.4 pthread_setcanceltype F GLIBC_2.4 pthread_setconcurrency F GLIBC_2.4 pthread_setschedprio F GLIBC_2.4 pthread_setspecific F -GLIBC_2.4 pthread_sigmask F GLIBC_2.4 pthread_spin_destroy F GLIBC_2.4 pthread_spin_init F GLIBC_2.4 pthread_spin_lock F diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist index 9b3cee65bb..c54aed2f8e 100644 --- a/sysdeps/unix/sysv/linux/csky/libc.abilist +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -1435,6 +1435,7 @@ GLIBC_2.29 pthread_self F GLIBC_2.29 pthread_setcancelstate F GLIBC_2.29 pthread_setcanceltype F GLIBC_2.29 pthread_setschedparam F +GLIBC_2.29 pthread_sigmask F GLIBC_2.29 ptrace F GLIBC_2.29 ptsname F GLIBC_2.29 ptsname_r F @@ -2089,3 +2090,4 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F diff --git a/sysdeps/unix/sysv/linux/csky/libpthread.abilist b/sysdeps/unix/sysv/linux/csky/libpthread.abilist index 8b72528819..977905a839 100644 --- a/sysdeps/unix/sysv/linux/csky/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/csky/libpthread.abilist @@ -166,7 +166,6 @@ GLIBC_2.29 pthread_setconcurrency F GLIBC_2.29 pthread_setname_np F GLIBC_2.29 pthread_setschedprio F GLIBC_2.29 pthread_setspecific F -GLIBC_2.29 pthread_sigmask F GLIBC_2.29 pthread_sigqueue F GLIBC_2.29 pthread_spin_destroy F GLIBC_2.29 pthread_spin_init F diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist index df6d96fbae..87373f755b 100644 --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -1274,6 +1274,7 @@ GLIBC_2.2 pthread_self F GLIBC_2.2 pthread_setcancelstate F GLIBC_2.2 pthread_setcanceltype F GLIBC_2.2 pthread_setschedparam F +GLIBC_2.2 pthread_sigmask F GLIBC_2.2 ptrace F GLIBC_2.2 ptsname F GLIBC_2.2 ptsname_r F @@ -2046,6 +2047,7 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 __confstr_chk F GLIBC_2.4 __fgets_chk F GLIBC_2.4 __fgets_unlocked_chk F diff --git a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist index 84fa775d95..558d3f0dfd 100644 --- a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist @@ -136,7 +136,6 @@ GLIBC_2.2 pthread_setcancelstate F GLIBC_2.2 pthread_setcanceltype F GLIBC_2.2 pthread_setconcurrency F GLIBC_2.2 pthread_setspecific F -GLIBC_2.2 pthread_sigmask F GLIBC_2.2 pthread_spin_destroy F GLIBC_2.2 pthread_spin_init F GLIBC_2.2 pthread_spin_lock F diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist index fcb625b6bf..1bd2e02f79 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -868,6 +868,7 @@ GLIBC_2.0 pthread_self F GLIBC_2.0 pthread_setcancelstate F GLIBC_2.0 pthread_setcanceltype F GLIBC_2.0 pthread_setschedparam F +GLIBC_2.0 pthread_sigmask F GLIBC_2.0 ptrace F GLIBC_2.0 putc F GLIBC_2.0 putc_unlocked F @@ -2212,6 +2213,7 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 __confstr_chk F GLIBC_2.4 __fgets_chk F GLIBC_2.4 __fgets_unlocked_chk F diff --git a/sysdeps/unix/sysv/linux/i386/libpthread.abilist b/sysdeps/unix/sysv/linux/i386/libpthread.abilist index 4727bd5d43..f13fdce3a8 100644 --- a/sysdeps/unix/sysv/linux/i386/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/i386/libpthread.abilist @@ -71,7 +71,6 @@ GLIBC_2.0 pthread_once F GLIBC_2.0 pthread_setcancelstate F GLIBC_2.0 pthread_setcanceltype F GLIBC_2.0 pthread_setspecific F -GLIBC_2.0 pthread_sigmask F GLIBC_2.0 pthread_testcancel F GLIBC_2.0 raise F GLIBC_2.0 read F diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist b/sysdeps/unix/sysv/linux/ia64/libc.abilist index cb556c5998..07e51d46bf 100644 --- a/sysdeps/unix/sysv/linux/ia64/libc.abilist +++ b/sysdeps/unix/sysv/linux/ia64/libc.abilist @@ -1295,6 +1295,7 @@ GLIBC_2.2 pthread_self F GLIBC_2.2 pthread_setcancelstate F GLIBC_2.2 pthread_setcanceltype F GLIBC_2.2 pthread_setschedparam F +GLIBC_2.2 pthread_sigmask F GLIBC_2.2 ptrace F GLIBC_2.2 ptsname F GLIBC_2.2 ptsname_r F @@ -2078,6 +2079,7 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 __confstr_chk F GLIBC_2.4 __fgets_chk F GLIBC_2.4 __fgets_unlocked_chk F diff --git a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist index 3d947a66aa..0c96fc3ccb 100644 --- a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist @@ -136,7 +136,6 @@ GLIBC_2.2 pthread_setcancelstate F GLIBC_2.2 pthread_setcanceltype F GLIBC_2.2 pthread_setconcurrency F GLIBC_2.2 pthread_setspecific F -GLIBC_2.2 pthread_sigmask F GLIBC_2.2 pthread_spin_destroy F GLIBC_2.2 pthread_spin_init F GLIBC_2.2 pthread_spin_lock F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist index 5e3cdea246..42ea4c24bf 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist @@ -134,6 +134,7 @@ GLIBC_2.30 twalk_r F GLIBC_2.31 msgctl F GLIBC_2.31 semctl F GLIBC_2.31 shmctl F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 _Exit F GLIBC_2.4 _IO_2_1_stderr_ D 0x98 GLIBC_2.4 _IO_2_1_stdin_ D 0x98 @@ -1497,6 +1498,7 @@ GLIBC_2.4 pthread_self F GLIBC_2.4 pthread_setcancelstate F GLIBC_2.4 pthread_setcanceltype F GLIBC_2.4 pthread_setschedparam F +GLIBC_2.4 pthread_sigmask F GLIBC_2.4 ptrace F GLIBC_2.4 ptsname F GLIBC_2.4 ptsname_r F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist index 129c64b0a7..050e799de8 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist @@ -186,7 +186,6 @@ GLIBC_2.4 pthread_setcanceltype F GLIBC_2.4 pthread_setconcurrency F GLIBC_2.4 pthread_setschedprio F GLIBC_2.4 pthread_setspecific F -GLIBC_2.4 pthread_sigmask F GLIBC_2.4 pthread_spin_destroy F GLIBC_2.4 pthread_spin_init F GLIBC_2.4 pthread_spin_lock F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist index ea5e7a41af..e9358fb092 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist @@ -867,6 +867,7 @@ GLIBC_2.0 pthread_self F GLIBC_2.0 pthread_setcancelstate F GLIBC_2.0 pthread_setcanceltype F GLIBC_2.0 pthread_setschedparam F +GLIBC_2.0 pthread_sigmask F GLIBC_2.0 ptrace F GLIBC_2.0 putc F GLIBC_2.0 putc_unlocked F @@ -2158,6 +2159,7 @@ GLIBC_2.30 twalk_r F GLIBC_2.31 msgctl F GLIBC_2.31 semctl F GLIBC_2.31 shmctl F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 __confstr_chk F GLIBC_2.4 __fgets_chk F GLIBC_2.4 __fgets_unlocked_chk F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist index 4727bd5d43..f13fdce3a8 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist @@ -71,7 +71,6 @@ GLIBC_2.0 pthread_once F GLIBC_2.0 pthread_setcancelstate F GLIBC_2.0 pthread_setcanceltype F GLIBC_2.0 pthread_setspecific F -GLIBC_2.0 pthread_sigmask F GLIBC_2.0 pthread_testcancel F GLIBC_2.0 raise F GLIBC_2.0 read F diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist index ac55b0acd7..2cefe739c0 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -1450,6 +1450,7 @@ GLIBC_2.18 pthread_self F GLIBC_2.18 pthread_setcancelstate F GLIBC_2.18 pthread_setcanceltype F GLIBC_2.18 pthread_setschedparam F +GLIBC_2.18 pthread_sigmask F GLIBC_2.18 ptrace F GLIBC_2.18 ptsname F GLIBC_2.18 ptsname_r F @@ -2140,3 +2141,4 @@ GLIBC_2.30 twalk_r F GLIBC_2.31 msgctl F GLIBC_2.31 semctl F GLIBC_2.31 shmctl F +GLIBC_2.32 pthread_sigmask F diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist index 78885c05cf..87bd3ad30e 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist @@ -158,7 +158,6 @@ GLIBC_2.18 pthread_setconcurrency F GLIBC_2.18 pthread_setname_np F GLIBC_2.18 pthread_setschedprio F GLIBC_2.18 pthread_setspecific F -GLIBC_2.18 pthread_sigmask F GLIBC_2.18 pthread_sigqueue F GLIBC_2.18 pthread_spin_destroy F GLIBC_2.18 pthread_spin_init F diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist index f7ced487f7..3474ef1490 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist @@ -1450,6 +1450,7 @@ GLIBC_2.18 pthread_self F GLIBC_2.18 pthread_setcancelstate F GLIBC_2.18 pthread_setcanceltype F GLIBC_2.18 pthread_setschedparam F +GLIBC_2.18 pthread_sigmask F GLIBC_2.18 ptrace F GLIBC_2.18 ptsname F GLIBC_2.18 ptsname_r F @@ -2137,3 +2138,4 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist index 78885c05cf..87bd3ad30e 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist @@ -158,7 +158,6 @@ GLIBC_2.18 pthread_setconcurrency F GLIBC_2.18 pthread_setname_np F GLIBC_2.18 pthread_setschedprio F GLIBC_2.18 pthread_setspecific F -GLIBC_2.18 pthread_sigmask F GLIBC_2.18 pthread_sigqueue F GLIBC_2.18 pthread_spin_destroy F GLIBC_2.18 pthread_spin_init F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist index 06c2e64edd..a6f99a7369 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist @@ -864,6 +864,7 @@ GLIBC_2.0 pthread_self F GLIBC_2.0 pthread_setcancelstate F GLIBC_2.0 pthread_setcanceltype F GLIBC_2.0 pthread_setschedparam F +GLIBC_2.0 pthread_sigmask F GLIBC_2.0 ptrace F GLIBC_2.0 putc F GLIBC_2.0 putc_unlocked F @@ -2129,6 +2130,7 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 __confstr_chk F GLIBC_2.4 __fgets_chk F GLIBC_2.4 __fgets_unlocked_chk F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist index 62f7a3f349..474ed999b3 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist @@ -71,7 +71,6 @@ GLIBC_2.0 pthread_once F GLIBC_2.0 pthread_setcancelstate F GLIBC_2.0 pthread_setcanceltype F GLIBC_2.0 pthread_setspecific F -GLIBC_2.0 pthread_sigmask F GLIBC_2.0 pthread_testcancel F GLIBC_2.0 raise F GLIBC_2.0 read F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist index bdfd073b86..48222af11c 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist @@ -864,6 +864,7 @@ GLIBC_2.0 pthread_self F GLIBC_2.0 pthread_setcancelstate F GLIBC_2.0 pthread_setcanceltype F GLIBC_2.0 pthread_setschedparam F +GLIBC_2.0 pthread_sigmask F GLIBC_2.0 ptrace F GLIBC_2.0 putc F GLIBC_2.0 putc_unlocked F @@ -2127,6 +2128,7 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 __confstr_chk F GLIBC_2.4 __fgets_chk F GLIBC_2.4 __fgets_unlocked_chk F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist index 62f7a3f349..474ed999b3 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist @@ -71,7 +71,6 @@ GLIBC_2.0 pthread_once F GLIBC_2.0 pthread_setcancelstate F GLIBC_2.0 pthread_setcanceltype F GLIBC_2.0 pthread_setspecific F -GLIBC_2.0 pthread_sigmask F GLIBC_2.0 pthread_testcancel F GLIBC_2.0 raise F GLIBC_2.0 read F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist index 3d61d4974a..99965cfb0f 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist @@ -864,6 +864,7 @@ GLIBC_2.0 pthread_self F GLIBC_2.0 pthread_setcancelstate F GLIBC_2.0 pthread_setcanceltype F GLIBC_2.0 pthread_setschedparam F +GLIBC_2.0 pthread_sigmask F GLIBC_2.0 ptrace F GLIBC_2.0 putc F GLIBC_2.0 putc_unlocked F @@ -2135,6 +2136,7 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 __confstr_chk F GLIBC_2.4 __fgets_chk F GLIBC_2.4 __fgets_unlocked_chk F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist index 675acca5db..2c8bafc669 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist @@ -862,6 +862,7 @@ GLIBC_2.0 pthread_self F GLIBC_2.0 pthread_setcancelstate F GLIBC_2.0 pthread_setcanceltype F GLIBC_2.0 pthread_setschedparam F +GLIBC_2.0 pthread_sigmask F GLIBC_2.0 ptrace F GLIBC_2.0 putc F GLIBC_2.0 putc_unlocked F @@ -2129,6 +2130,7 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 __confstr_chk F GLIBC_2.4 __fgets_chk F GLIBC_2.4 __fgets_unlocked_chk F diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist index 7fec0c9670..52cf72052c 100644 --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist @@ -1492,6 +1492,7 @@ GLIBC_2.21 pthread_self F GLIBC_2.21 pthread_setcancelstate F GLIBC_2.21 pthread_setcanceltype F GLIBC_2.21 pthread_setschedparam F +GLIBC_2.21 pthread_sigmask F GLIBC_2.21 ptrace F GLIBC_2.21 ptsname F GLIBC_2.21 ptsname_r F @@ -2178,3 +2179,4 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F diff --git a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist index 45ebcf5a6c..fb9c4a178a 100644 --- a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist @@ -158,7 +158,6 @@ GLIBC_2.21 pthread_setconcurrency F GLIBC_2.21 pthread_setname_np F GLIBC_2.21 pthread_setschedprio F GLIBC_2.21 pthread_setspecific F -GLIBC_2.21 pthread_sigmask F GLIBC_2.21 pthread_sigqueue F GLIBC_2.21 pthread_spin_destroy F GLIBC_2.21 pthread_spin_init F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist index 1e8ff6f83e..2ca5bbccf3 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -875,6 +875,7 @@ GLIBC_2.0 pthread_self F GLIBC_2.0 pthread_setcancelstate F GLIBC_2.0 pthread_setcanceltype F GLIBC_2.0 pthread_setschedparam F +GLIBC_2.0 pthread_sigmask F GLIBC_2.0 ptrace F GLIBC_2.0 putc F GLIBC_2.0 putc_unlocked F @@ -2185,6 +2186,7 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 _IO_fprintf F GLIBC_2.4 _IO_printf F GLIBC_2.4 _IO_sprintf F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist index 2f4ed55693..65a9ef573e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist @@ -71,7 +71,6 @@ GLIBC_2.0 pthread_once F GLIBC_2.0 pthread_setcancelstate F GLIBC_2.0 pthread_setcanceltype F GLIBC_2.0 pthread_setspecific F -GLIBC_2.0 pthread_sigmask F GLIBC_2.0 pthread_testcancel F GLIBC_2.0 raise F GLIBC_2.0 read F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist index 0c86217fc6..82d77b7e48 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist @@ -1380,6 +1380,7 @@ GLIBC_2.3 pthread_self F GLIBC_2.3 pthread_setcancelstate F GLIBC_2.3 pthread_setcanceltype F GLIBC_2.3 pthread_setschedparam F +GLIBC_2.3 pthread_sigmask F GLIBC_2.3 ptrace F GLIBC_2.3 ptsname F GLIBC_2.3 ptsname_r F @@ -2048,6 +2049,7 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 _IO_fprintf F GLIBC_2.4 _IO_printf F GLIBC_2.4 _IO_sprintf F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist index f4d34b1c47..fe5bf9fd47 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist @@ -157,7 +157,6 @@ GLIBC_2.3 pthread_setcancelstate F GLIBC_2.3 pthread_setcanceltype F GLIBC_2.3 pthread_setconcurrency F GLIBC_2.3 pthread_setspecific F -GLIBC_2.3 pthread_sigmask F GLIBC_2.3 pthread_spin_destroy F GLIBC_2.3 pthread_spin_init F GLIBC_2.3 pthread_spin_lock F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist index 2229a1dcc0..2b6a76d9c2 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist @@ -1536,6 +1536,7 @@ GLIBC_2.17 pthread_self F GLIBC_2.17 pthread_setcancelstate F GLIBC_2.17 pthread_setcanceltype F GLIBC_2.17 pthread_setschedparam F +GLIBC_2.17 pthread_sigmask F GLIBC_2.17 ptrace F GLIBC_2.17 ptsname F GLIBC_2.17 ptsname_r F @@ -2247,3 +2248,4 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist index d65beba958..48b368acb1 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist @@ -156,7 +156,6 @@ GLIBC_2.17 pthread_setconcurrency F GLIBC_2.17 pthread_setname_np F GLIBC_2.17 pthread_setschedprio F GLIBC_2.17 pthread_setspecific F -GLIBC_2.17 pthread_sigmask F GLIBC_2.17 pthread_sigqueue F GLIBC_2.17 pthread_spin_destroy F GLIBC_2.17 pthread_spin_init F diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist index 31010e6cf7..234d34929a 100644 --- a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist +++ b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist @@ -1438,6 +1438,7 @@ GLIBC_2.27 pthread_self F GLIBC_2.27 pthread_setcancelstate F GLIBC_2.27 pthread_setcanceltype F GLIBC_2.27 pthread_setschedparam F +GLIBC_2.27 pthread_sigmask F GLIBC_2.27 ptrace F GLIBC_2.27 ptsname F GLIBC_2.27 ptsname_r F @@ -2107,3 +2108,4 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist index 5610e51e10..44e3719991 100644 --- a/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist @@ -155,7 +155,6 @@ GLIBC_2.27 pthread_setconcurrency F GLIBC_2.27 pthread_setname_np F GLIBC_2.27 pthread_setschedprio F GLIBC_2.27 pthread_setspecific F -GLIBC_2.27 pthread_sigmask F GLIBC_2.27 pthread_sigqueue F GLIBC_2.27 pthread_spin_destroy F GLIBC_2.27 pthread_spin_init F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist index 4feca641b0..1f06cce028 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -866,6 +866,7 @@ GLIBC_2.0 pthread_self F GLIBC_2.0 pthread_setcancelstate F GLIBC_2.0 pthread_setcanceltype F GLIBC_2.0 pthread_setschedparam F +GLIBC_2.0 pthread_sigmask F GLIBC_2.0 ptrace F GLIBC_2.0 putc F GLIBC_2.0 putc_unlocked F @@ -2183,6 +2184,7 @@ GLIBC_2.30 twalk_r F GLIBC_2.31 msgctl F GLIBC_2.31 semctl F GLIBC_2.31 shmctl F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 _IO_fprintf F GLIBC_2.4 _IO_printf F GLIBC_2.4 _IO_sprintf F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist index 80ad434007..0b2913ba2b 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist @@ -71,7 +71,6 @@ GLIBC_2.0 pthread_once F GLIBC_2.0 pthread_setcancelstate F GLIBC_2.0 pthread_setcanceltype F GLIBC_2.0 pthread_setspecific F -GLIBC_2.0 pthread_sigmask F GLIBC_2.0 pthread_testcancel F GLIBC_2.0 raise F GLIBC_2.0 read F diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist index efe588a072..26c2ce32e5 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist @@ -1292,6 +1292,7 @@ GLIBC_2.2 pthread_self F GLIBC_2.2 pthread_setcancelstate F GLIBC_2.2 pthread_setcanceltype F GLIBC_2.2 pthread_setschedparam F +GLIBC_2.2 pthread_sigmask F GLIBC_2.2 ptrace F GLIBC_2.2 ptsname F GLIBC_2.2 ptsname_r F @@ -2084,6 +2085,7 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 _IO_fprintf F GLIBC_2.4 _IO_printf F GLIBC_2.4 _IO_sprintf F diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist index daef2b5cd5..8c71cdc48d 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist @@ -138,7 +138,6 @@ GLIBC_2.2 pthread_setcancelstate F GLIBC_2.2 pthread_setcanceltype F GLIBC_2.2 pthread_setconcurrency F GLIBC_2.2 pthread_setspecific F -GLIBC_2.2 pthread_sigmask F GLIBC_2.2 pthread_spin_destroy F GLIBC_2.2 pthread_spin_init F GLIBC_2.2 pthread_spin_lock F diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist index 6bfc2b7439..7ad2e920c3 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist @@ -1278,6 +1278,7 @@ GLIBC_2.2 pthread_self F GLIBC_2.2 pthread_setcancelstate F GLIBC_2.2 pthread_setcanceltype F GLIBC_2.2 pthread_setschedparam F +GLIBC_2.2 pthread_sigmask F GLIBC_2.2 ptrace F GLIBC_2.2 ptsname F GLIBC_2.2 ptsname_r F @@ -2053,6 +2054,7 @@ GLIBC_2.30 twalk_r F GLIBC_2.31 msgctl F GLIBC_2.31 semctl F GLIBC_2.31 shmctl F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 __confstr_chk F GLIBC_2.4 __fgets_chk F GLIBC_2.4 __fgets_unlocked_chk F diff --git a/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist b/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist index 84fa775d95..558d3f0dfd 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist @@ -136,7 +136,6 @@ GLIBC_2.2 pthread_setcancelstate F GLIBC_2.2 pthread_setcanceltype F GLIBC_2.2 pthread_setconcurrency F GLIBC_2.2 pthread_setspecific F -GLIBC_2.2 pthread_sigmask F GLIBC_2.2 pthread_spin_destroy F GLIBC_2.2 pthread_spin_init F GLIBC_2.2 pthread_spin_lock F diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist index 4b057bf4a2..d2611bf0a5 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist @@ -1278,6 +1278,7 @@ GLIBC_2.2 pthread_self F GLIBC_2.2 pthread_setcancelstate F GLIBC_2.2 pthread_setcanceltype F GLIBC_2.2 pthread_setschedparam F +GLIBC_2.2 pthread_sigmask F GLIBC_2.2 ptrace F GLIBC_2.2 ptsname F GLIBC_2.2 ptsname_r F @@ -2050,6 +2051,7 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 __confstr_chk F GLIBC_2.4 __fgets_chk F GLIBC_2.4 __fgets_unlocked_chk F diff --git a/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist b/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist index 84fa775d95..558d3f0dfd 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist @@ -136,7 +136,6 @@ GLIBC_2.2 pthread_setcancelstate F GLIBC_2.2 pthread_setcanceltype F GLIBC_2.2 pthread_setconcurrency F GLIBC_2.2 pthread_setspecific F -GLIBC_2.2 pthread_sigmask F GLIBC_2.2 pthread_spin_destroy F GLIBC_2.2 pthread_spin_init F GLIBC_2.2 pthread_spin_lock F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist index 49cd597fd6..18a528f0e9 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist @@ -869,6 +869,7 @@ GLIBC_2.0 pthread_self F GLIBC_2.0 pthread_setcancelstate F GLIBC_2.0 pthread_setcanceltype F GLIBC_2.0 pthread_setschedparam F +GLIBC_2.0 pthread_sigmask F GLIBC_2.0 ptrace F GLIBC_2.0 putc F GLIBC_2.0 putc_unlocked F @@ -2174,6 +2175,7 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 _IO_fprintf F GLIBC_2.4 _IO_printf F GLIBC_2.4 _IO_sprintf F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist index ffd443422d..cfffc5f529 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist @@ -71,7 +71,6 @@ GLIBC_2.0 pthread_once F GLIBC_2.0 pthread_setcancelstate F GLIBC_2.0 pthread_setcanceltype F GLIBC_2.0 pthread_setspecific F -GLIBC_2.0 pthread_sigmask F GLIBC_2.0 pthread_testcancel F GLIBC_2.0 raise F GLIBC_2.0 read F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist index 95e68e0ba1..a1d48b0f3c 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist @@ -1321,6 +1321,7 @@ GLIBC_2.2 pthread_self F GLIBC_2.2 pthread_setcancelstate F GLIBC_2.2 pthread_setcanceltype F GLIBC_2.2 pthread_setschedparam F +GLIBC_2.2 pthread_sigmask F GLIBC_2.2 ptrace F GLIBC_2.2 ptsname F GLIBC_2.2 ptsname_r F @@ -2101,6 +2102,7 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 __confstr_chk F GLIBC_2.4 __fgets_chk F GLIBC_2.4 __fgets_unlocked_chk F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist index 3d947a66aa..0c96fc3ccb 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist @@ -136,7 +136,6 @@ GLIBC_2.2 pthread_setcancelstate F GLIBC_2.2 pthread_setcanceltype F GLIBC_2.2 pthread_setconcurrency F GLIBC_2.2 pthread_setspecific F -GLIBC_2.2 pthread_sigmask F GLIBC_2.2 pthread_spin_destroy F GLIBC_2.2 pthread_spin_init F GLIBC_2.2 pthread_spin_lock F diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist index 1f2dbd1451..6418ace78a 100644 --- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist @@ -1288,6 +1288,7 @@ GLIBC_2.2.5 pthread_self F GLIBC_2.2.5 pthread_setcancelstate F GLIBC_2.2.5 pthread_setcanceltype F GLIBC_2.2.5 pthread_setschedparam F +GLIBC_2.2.5 pthread_sigmask F GLIBC_2.2.5 ptrace F GLIBC_2.2.5 ptsname F GLIBC_2.2.5 ptsname_r F @@ -2059,6 +2060,7 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F GLIBC_2.4 __confstr_chk F GLIBC_2.4 __fgets_chk F GLIBC_2.4 __fgets_unlocked_chk F diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist index a6bc9f4a55..2888c3150b 100644 --- a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist @@ -137,7 +137,6 @@ GLIBC_2.2.5 pthread_setcancelstate F GLIBC_2.2.5 pthread_setcanceltype F GLIBC_2.2.5 pthread_setconcurrency F GLIBC_2.2.5 pthread_setspecific F -GLIBC_2.2.5 pthread_sigmask F GLIBC_2.2.5 pthread_spin_destroy F GLIBC_2.2.5 pthread_spin_init F GLIBC_2.2.5 pthread_spin_lock F diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist index 59da85a5d8..edb9f2f004 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist @@ -1455,6 +1455,7 @@ GLIBC_2.16 pthread_self F GLIBC_2.16 pthread_setcancelstate F GLIBC_2.16 pthread_setcanceltype F GLIBC_2.16 pthread_setschedparam F +GLIBC_2.16 pthread_sigmask F GLIBC_2.16 ptrace F GLIBC_2.16 ptsname F GLIBC_2.16 ptsname_r F @@ -2158,3 +2159,4 @@ GLIBC_2.30 getdents64 F GLIBC_2.30 gettid F GLIBC_2.30 tgkill F GLIBC_2.30 twalk_r F +GLIBC_2.32 pthread_sigmask F diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist index 17f6ec438f..5ac72e4515 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist @@ -156,7 +156,6 @@ GLIBC_2.16 pthread_setconcurrency F GLIBC_2.16 pthread_setname_np F GLIBC_2.16 pthread_setschedprio F GLIBC_2.16 pthread_setspecific F -GLIBC_2.16 pthread_sigmask F GLIBC_2.16 pthread_sigqueue F GLIBC_2.16 pthread_spin_destroy F GLIBC_2.16 pthread_spin_init F From patchwork Fri Mar 13 19:48:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 38557 X-Patchwork-Delegate: azanella@linux.vnet.ibm.com Return-Path: X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by sourceware.org (Postfix) with ESMTPS id 60C2D38A2417 for ; Fri, 13 Mar 2020 19:48:34 +0000 (GMT) Received: by mail-qk1-x743.google.com with SMTP id c145so14646855qke.12 for ; Fri, 13 Mar 2020 12:48:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=7QDT/Lto/6EklhnPnM4AxkWOinpHohjLRXDGdyuo2Rs=; b=XlhP+6d3dAMrzKmhFSkmmOYHDXTMGwlToW+YKEBfuf9pLqaLrwL6pD4E+2a8sGlbv0 +pn+ktqYCOjNGkw6yRMWtOR9Tlq/kNuU7jUAcuG+kwxq2ofnxu6B/axGpGYej3/lI3wV i217Jr2NNxBod53srU1avdEDECEI1NMDzudzDg6sey7NO+8OPgR+lVI6tjeGCa3XLRl5 l+LAaYNCSrkXQd+WskqV7wm3EppkXA4d/ycIu8bao2G2gc9o88Sp2iFeli1U6RT0ZLki +csKqg6R6MFJct4Vob53PQZo+DUERt2l+axC2CxvBEfzFPHxptyGuxodZFYV4uL6pCrH smTg== X-Gm-Message-State: ANhLgQ1mVTIMUGhn3IhPmjoHCSUIiEX4JsgcRmEbAGGZvMsR0eZH/1Ij ZZldVlBk2y5JvEWKPJd7ofpnc8IRvZU= X-Google-Smtp-Source: ADFU+vvELPR64nIGhQF90KK6pUvxtNiZD+Hq29fgFXBp/NEufy973+eFAqtw59H5gvEGKAwX0qNerw== X-Received: by 2002:a37:9f58:: with SMTP id i85mr14379271qke.196.1584128913686; Fri, 13 Mar 2020 12:48:33 -0700 (PDT) Received: from localhost.localdomain ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id r10sm29497900qkm.23.2020.03.13.12.48.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2020 12:48:33 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 2/4] ia64: Remove sigprocmask/sigblock objects from libpthread Date: Fri, 13 Mar 2020 16:48:25 -0300 Message-Id: <20200313194827.4467-2-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200313194827.4467-1-adhemerval.zanella@linaro.org> References: <20200313194827.4467-1-adhemerval.zanella@linaro.org> X-Spam-Status: No, score=-25.2 required=5.0 tests=DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2020 19:48:35 -0000 It is required because __libc_unwind_longjmp (used on thread cancellation) calls __sigprocmask. Replace with a direct call. The sigblock was never exported and thus unused. Checked on cross build for ia64-linux-gnu. --- sysdeps/ia64/nptl/Makefile | 4 ++-- sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sysdeps/ia64/nptl/Makefile b/sysdeps/ia64/nptl/Makefile index b7d87c37c8..d34cb27699 100644 --- a/sysdeps/ia64/nptl/Makefile +++ b/sysdeps/ia64/nptl/Makefile @@ -20,6 +20,6 @@ gen-as-const-headers += tcb-offsets.sym endif ifeq ($(subdir),nptl) -libpthread-routines += sysdep sigblock sigprocmask -libpthread-shared-only-routines += sysdep sigblock sigprocmask +libpthread-routines += sysdep +libpthread-shared-only-routines += sysdep endif diff --git a/sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c b/sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c index 93d1d66dd0..d9ed942963 100644 --- a/sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c +++ b/sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c @@ -34,8 +34,7 @@ __libc_unwind_longjmp (sigjmp_buf env, int val) if (env[0].__mask_was_saved) /* Restore the saved signal mask. */ - (void) __sigprocmask (SIG_SETMASK, &env[0].__saved_mask, - (sigset_t *) NULL); + __libc_signal_restore_set (&env[0].__saved_mask); /* Call the machine-dependent function to restore machine state. */ __sigstack_longjmp (env[0].__jmpbuf, val ?: 1); From patchwork Fri Mar 13 19:48:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 38558 X-Patchwork-Delegate: azanella@linux.vnet.ibm.com Return-Path: X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by sourceware.org (Postfix) with ESMTPS id 03D9B38A2417 for ; Fri, 13 Mar 2020 19:48:36 +0000 (GMT) Received: by mail-qk1-x743.google.com with SMTP id j2so1804715qkl.7 for ; Fri, 13 Mar 2020 12:48:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=BPXAzU5rDpcWpxDZqmnY5s5C9Ndj/XK7ciWxanObJww=; b=O2fkFG92yJIg8UU+eeh88LalC7lBGCrtv1ik2Hxzm8dzxbFkkVImur/E+q4dz89ZGN 4gWm6w+2ZoN793M7nebluotGEtg6i4LTIwYmhunbkXEgqo6KhwA8pPHLej7Xs0hoT1FL BA1vk2xwY1QaAe8twtxH25HJu7F1O2aJDu6wGrbg+saZU9lxw9WNoRZBSVX3D8ym0jjo fcBLN7M6Ol+kWURs7J4Kz6v/DPT4UP9Gfam2XKC5Nfa65nwdbc5PZDjKDomYLoPuzycn H1UixdzydDZFb94DSUzP1kimCvGKbDf83cIiDIWgrRwnHieGae9oLIL9vkDabw9Wpz3y WXcQ== X-Gm-Message-State: ANhLgQ0NDif0fklrXpB5MaEF0PRQjMu55wTUNizUt4byaBlKlHRFbjCL s7hKOytxG3/jvMcXzuv2dJw05dVt12g= X-Google-Smtp-Source: ADFU+vumo9Yb40+pTjy1GlCiKMWgG4PoYYfaPMb7FF4b2nknPGJgV/Vkna36uKcL/ocdxSGcSz4sdw== X-Received: by 2002:a37:b903:: with SMTP id j3mr14849530qkf.62.1584128915229; Fri, 13 Mar 2020 12:48:35 -0700 (PDT) Received: from localhost.localdomain ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id r10sm29497900qkm.23.2020.03.13.12.48.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2020 12:48:34 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH v2 3/4] linux: Use pthread_sigmask on sigprocmask Date: Fri, 13 Mar 2020 16:48:26 -0300 Message-Id: <20200313194827.4467-3-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200313194827.4467-1-adhemerval.zanella@linaro.org> References: <20200313194827.4467-1-adhemerval.zanella@linaro.org> X-Spam-Status: No, score=-25.2 required=5.0 tests=DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2020 19:48:36 -0000 With pthread_sigmask on libc.so, it allows consolidate both implementations. Checked on x86_64-linux-gnu. --- nptl/pthreadP.h | 1 + nptl/pthread_sigmask.c | 2 ++ sysdeps/unix/sysv/linux/sigprocmask.c | 20 +++++--------------- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index edec8d0501..c6d8fc69be 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -484,6 +484,7 @@ extern int __pthread_clockjoin_ex (pthread_t, void **, clockid_t, attribute_hidden; extern int __pthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask); +libc_hidden_proto (__pthread_sigmask) #if IS_IN (libpthread) diff --git a/nptl/pthread_sigmask.c b/nptl/pthread_sigmask.c index 0e326d610c..c6c6e83c08 100644 --- a/nptl/pthread_sigmask.c +++ b/nptl/pthread_sigmask.c @@ -46,6 +46,8 @@ __pthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask) ? INTERNAL_SYSCALL_ERRNO (result) : 0); } +libc_hidden_def (__pthread_sigmask) + versioned_symbol (libc, __pthread_sigmask, pthread_sigmask, GLIBC_2_32); #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_32) strong_alias (__pthread_sigmask, __pthread_sigmask_2); diff --git a/sysdeps/unix/sysv/linux/sigprocmask.c b/sysdeps/unix/sysv/linux/sigprocmask.c index eb9e4d5e83..6ed0ab1e6a 100644 --- a/sysdeps/unix/sysv/linux/sigprocmask.c +++ b/sysdeps/unix/sysv/linux/sigprocmask.c @@ -22,21 +22,11 @@ int __sigprocmask (int how, const sigset_t *set, sigset_t *oset) { - sigset_t local_newmask; - - /* The only thing we have to make sure here is that SIGCANCEL and - SIGSETXID are not blocked. */ - if (set != NULL - && __glibc_unlikely (__sigismember (set, SIGCANCEL) - || __glibc_unlikely (__sigismember (set, SIGSETXID)))) - { - local_newmask = *set; - __sigdelset (&local_newmask, SIGCANCEL); - __sigdelset (&local_newmask, SIGSETXID); - set = &local_newmask; - } - - return INLINE_SYSCALL_CALL (rt_sigprocmask, how, set, oset, _NSIG / 8); + int result = __pthread_sigmask (how, set, oset); + if (result == 0) + return 0; + __set_errno (result); + return result; } libc_hidden_def (__sigprocmask) weak_alias (__sigprocmask, sigprocmask) From patchwork Fri Mar 13 19:48:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 38560 X-Patchwork-Delegate: azanella@linux.vnet.ibm.com Return-Path: X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by sourceware.org (Postfix) with ESMTPS id 317703AAA067 for ; Fri, 13 Mar 2020 19:48:38 +0000 (GMT) Received: by mail-qk1-x741.google.com with SMTP id j2so1804889qkl.7 for ; Fri, 13 Mar 2020 12:48:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=oBJq5QbCt7Mz2imV8WznVNaQuEARIgbQQ/QhTtwKs+4=; b=dLiVsYCT91YbnI7uFTyrgpPmGkzlgYeQ6YATxOGREbcni0ZbZdYAeylPc7SXl1Qbbq IL8SDhtkmt/5W8EiCJp2+ptZxypATZ+z/jIK6CBVvaPOqfPQfMdxHJGH9CNczfswjoGb vNYziaAkMF/SG8E2NfJMmtJeNlUvyYzRlNKeBKPumGpy6Wv8HWvfPaJuWNk2tEkPVNvY fAusndIQ6qhcsMBfZE1DvGjTtx5y3LFD9M2sbmWGNSjrG6+GmxdSmS+bdpjoHDp2Mcws tvTWexwKcEJgiz2BzWU90RY10Pq30q4fd3EBfrGP2xCVJ6sIaK2XGVHB0dMJcnHuLUJq c5Mw== X-Gm-Message-State: ANhLgQ3PmU8X1n4lvyHw5s9sHrYIbK3DHVaLI7VfhxOi/cAFW2CZLrkY TBUNG8RQapXRhsScSv+Ng7jtTqQ6mYY= X-Google-Smtp-Source: ADFU+vsFRCQF/FBpXlgBpEPvTcTPdJ8bys7HoM9f/9bxL+g9fAbfIWnFUS6NoFLZ5/ftfgoEw41e5g== X-Received: by 2002:a05:620a:529:: with SMTP id h9mr7143269qkh.142.1584128917079; Fri, 13 Mar 2020 12:48:37 -0700 (PDT) Received: from localhost.localdomain ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id r10sm29497900qkm.23.2020.03.13.12.48.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2020 12:48:36 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 4/4] signal: Only handle on NSIG signals on signal functions (BZ #25657) Date: Fri, 13 Mar 2020 16:48:27 -0300 Message-Id: <20200313194827.4467-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200313194827.4467-1-adhemerval.zanella@linaro.org> References: <20200313194827.4467-1-adhemerval.zanella@linaro.org> X-Spam-Status: No, score=-25.2 required=5.0 tests=DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2020 19:48:39 -0000 The upper bits of the sigset_t s not fully initialized in the signal mask calls that return information from kernel (sigprocmask, sigpending, and pthread_sigmask), since the exported sigset_t size (1024 bits) is larger than Linux support one (64 or 128 bits). It might make sigisemptyset/sigorset/sigandset fail if the mask is filled prior the call. This patch changes the internal signal function to handle up to supported Linux signal number (_NSIG), the remaining bits are untouched. Checked on x86_64-linux-gnu and i686-linux-gnu. --- nptl/Makefile | 2 +- nptl/pthread_sigmask.c | 7 +- nptl/tst-signal8.c | 62 ++++++++++++ signal/Makefile | 1 + signal/sigsetops.c | 12 +-- signal/tst-sigisemptyset.c | 95 ++++++++++++++++++ sysdeps/unix/sysv/linux/sigpending.c | 6 +- sysdeps/unix/sysv/linux/sigsetops.h | 143 +++++++++++++-------------- 8 files changed, 236 insertions(+), 92 deletions(-) create mode 100644 nptl/tst-signal8.c create mode 100644 signal/tst-sigisemptyset.c diff --git a/nptl/Makefile b/nptl/Makefile index 4816fa254e..33fa03807e 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -293,7 +293,7 @@ tests = tst-attr2 tst-attr3 tst-default-attr \ tst-cleanup0 tst-cleanup1 tst-cleanup2 tst-cleanup3 tst-cleanup4 \ tst-flock1 tst-flock2 \ tst-signal1 tst-signal2 tst-signal3 tst-signal4 tst-signal5 \ - tst-signal6 \ + tst-signal6 tst-signal8 \ tst-exec1 tst-exec2 tst-exec3 tst-exec4 tst-exec5 \ tst-exit1 tst-exit2 tst-exit3 \ tst-stdio1 tst-stdio2 \ diff --git a/nptl/pthread_sigmask.c b/nptl/pthread_sigmask.c index c6c6e83c08..d266d296c5 100644 --- a/nptl/pthread_sigmask.c +++ b/nptl/pthread_sigmask.c @@ -29,12 +29,11 @@ __pthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask) /* The only thing we have to make sure here is that SIGCANCEL and SIGSETXID is not blocked. */ if (newmask != NULL - && (__builtin_expect (__sigismember (newmask, SIGCANCEL), 0) - || __builtin_expect (__sigismember (newmask, SIGSETXID), 0))) + && (__glibc_unlikely (__sigismember (newmask, SIGCANCEL)) + || __glibc_unlikely (__sigismember (newmask, SIGSETXID)))) { local_newmask = *newmask; - __sigdelset (&local_newmask, SIGCANCEL); - __sigdelset (&local_newmask, SIGSETXID); + __clear_internal_signals (&local_newmask); newmask = &local_newmask; } diff --git a/nptl/tst-signal8.c b/nptl/tst-signal8.c new file mode 100644 index 0000000000..9da7e5ef07 --- /dev/null +++ b/nptl/tst-signal8.c @@ -0,0 +1,62 @@ +/* Tests for sigisemptyset and pthread_sigmask. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +#include +#include + +static void * +tf (void *arg) +{ + { + sigset_t set; + sigemptyset (&set); + TEST_COMPARE (pthread_sigmask (SIG_BLOCK, 0, &set), 0); + TEST_COMPARE (sigisemptyset (&set), 1); + } + + { + sigset_t set; + sigfillset (&set); + TEST_COMPARE (pthread_sigmask (SIG_BLOCK, 0, &set), 0); + TEST_COMPARE (sigisemptyset (&set), 1); + } + + return NULL; +} + +static int +do_test (void) +{ + /* Ensure current SIG_BLOCK mask empty. */ + { + sigset_t set; + sigemptyset (&set); + TEST_COMPARE (sigprocmask (SIG_BLOCK, &set, 0), 0); + } + + { + pthread_t thr = xpthread_create (NULL, tf, NULL); + xpthread_join (thr); + } + + return 0; +} + +#include diff --git a/signal/Makefile b/signal/Makefile index 37de438bba..f3c19e2992 100644 --- a/signal/Makefile +++ b/signal/Makefile @@ -49,6 +49,7 @@ tests := tst-signal tst-sigset tst-sigsimple tst-raise tst-sigset2 \ tst-sigwait-eintr tst-sigaction \ tst-minsigstksz-1 tst-minsigstksz-2 tst-minsigstksz-3 \ tst-minsigstksz-3a tst-minsigstksz-4 \ + tst-sigisemptyset include ../Rules diff --git a/signal/sigsetops.c b/signal/sigsetops.c index eb89e6780e..1165377876 100644 --- a/signal/sigsetops.c +++ b/signal/sigsetops.c @@ -26,28 +26,28 @@ int attribute_compat_text_section -(__sigismember) (const __sigset_t *set, int sig) +__sigismember_compat (const __sigset_t *set, int sig) { return __sigismember (set, sig); } -compat_symbol (libc, __sigismember, __sigismember, GLIBC_2_0); +compat_symbol (libc, __sigismember_compat, __sigismember, GLIBC_2_0); int attribute_compat_text_section -(__sigaddset) (__sigset_t *set, int sig) +__sigaddset_compat (__sigset_t *set, int sig) { __sigaddset (set, sig); return 0; } -compat_symbol (libc, __sigaddset, __sigaddset, GLIBC_2_0); +compat_symbol (libc, __sigaddset_compat, __sigaddset, GLIBC_2_0); int attribute_compat_text_section -(__sigdelset) (__sigset_t *set, int sig) +__sigdelset_compat (__sigset_t *set, int sig) { __sigdelset (set, sig); return 0; } -compat_symbol (libc, __sigdelset, __sigdelset, GLIBC_2_0); +compat_symbol (libc, __sigdelset_compat, __sigdelset, GLIBC_2_0); #endif diff --git a/signal/tst-sigisemptyset.c b/signal/tst-sigisemptyset.c new file mode 100644 index 0000000000..9ed95496f2 --- /dev/null +++ b/signal/tst-sigisemptyset.c @@ -0,0 +1,95 @@ +/* Tests for sigisemptyset/sigorset/sigandset. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +#include + +static int +do_test (void) +{ + { + sigset_t set; + sigemptyset (&set); + TEST_COMPARE (sigisemptyset (&set), 1); + } + + { + sigset_t set; + sigfillset (&set); + TEST_COMPARE (sigisemptyset (&set), 0); + } + + { + sigset_t setfill, setempty, set; + sigfillset (&setfill); + sigemptyset (&setempty); + + sigorset (&set, &setfill, &setempty); + TEST_COMPARE (sigisemptyset (&set), 0); + + sigandset (&set, &setfill, &setempty); + TEST_COMPARE (sigisemptyset (&set), 1); + } + + /* Ensure current SIG_BLOCK mask empty. */ + { + sigset_t set; + sigemptyset (&set); + TEST_COMPARE (sigprocmask (SIG_BLOCK, &set, 0), 0); + } + + { + sigset_t set; + sigemptyset (&set); + TEST_COMPARE (sigprocmask (SIG_BLOCK, 0, &set), 0); + TEST_COMPARE (sigisemptyset (&set), 1); + } + + { + sigset_t set; + sigfillset (&set); + TEST_COMPARE (sigprocmask (SIG_BLOCK, 0, &set), 0); + TEST_COMPARE (sigisemptyset (&set), 1); + } + + /* Block all signals. */ + { + sigset_t set; + sigfillset (&set); + TEST_COMPARE (sigprocmask (SIG_BLOCK, &set, 0), 0); + } + + { + sigset_t set; + sigemptyset (&set); + TEST_COMPARE (sigpending (&set), 0); + TEST_COMPARE (sigisemptyset (&set), 1); + } + + { + sigset_t set; + sigfillset (&set); + TEST_COMPARE (sigpending (&set), 0); + TEST_COMPARE (sigisemptyset (&set), 1); + } + + return 0; +} + +#include diff --git a/sysdeps/unix/sysv/linux/sigpending.c b/sysdeps/unix/sysv/linux/sigpending.c index f6bedb5182..458a3cf99e 100644 --- a/sysdeps/unix/sysv/linux/sigpending.c +++ b/sysdeps/unix/sysv/linux/sigpending.c @@ -15,13 +15,9 @@ License along with the GNU C Library; if not, see . */ -#include #include -#include - #include -#include - +#include /* Change the set of blocked signals to SET, wait until a signal arrives, and restore the set of blocked signals. */ diff --git a/sysdeps/unix/sysv/linux/sigsetops.h b/sysdeps/unix/sysv/linux/sigsetops.h index cb97c98b10..f6ca34c842 100644 --- a/sysdeps/unix/sysv/linux/sigsetops.h +++ b/sysdeps/unix/sysv/linux/sigsetops.h @@ -28,81 +28,72 @@ /* Return the word index for SIG. */ # define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int))) -# define __sigemptyset(set) \ - (__extension__ ({ \ - int __cnt = _SIGSET_NWORDS; \ - sigset_t *__set = (set); \ - while (--__cnt >= 0) \ - __set->__val[__cnt] = 0; \ - (void)0; \ - })) - -# define __sigfillset(set) \ - (__extension__ ({ \ - int __cnt = _SIGSET_NWORDS; \ - sigset_t *__set = (set); \ - while (--__cnt >= 0) \ - __set->__val[__cnt] = ~0UL; \ - (void)0; \ - })) - -# define __sigisemptyset(set) \ - (__extension__ ({ \ - int __cnt = _SIGSET_NWORDS; \ - const sigset_t *__set = (set); \ - int __ret = __set->__val[--__cnt]; \ - while (!__ret && --__cnt >= 0) \ - __ret = __set->__val[__cnt]; \ - __ret == 0; \ - })) - -# define __sigandset(dest, left, right) \ - (__extension__ ({ \ - int __cnt = _SIGSET_NWORDS; \ - sigset_t *__dest = (dest); \ - const sigset_t *__left = (left); \ - const sigset_t *__right = (right); \ - while (--__cnt >= 0) \ - __dest->__val[__cnt] = (__left->__val[__cnt] \ - & __right->__val[__cnt]); \ - (void)0; \ - })) - -# define __sigorset(dest, left, right) \ - (__extension__ ({ \ - int __cnt = _SIGSET_NWORDS; \ - sigset_t *__dest = (dest); \ - const sigset_t *__left = (left); \ - const sigset_t *__right = (right); \ - while (--__cnt >= 0) \ - __dest->__val[__cnt] = (__left->__val[__cnt] \ - | __right->__val[__cnt]); \ - (void)0; \ - })) - -/* These macros needn't check for a bogus signal number; - error checking is done in the non-__ versions. */ -# define __sigismember(set, sig) \ - (__extension__ ({ \ - unsigned long int __mask = __sigmask (sig); \ - unsigned long int __word = __sigword (sig); \ - (set)->__val[__word] & __mask ? 1 : 0; \ - })) - -# define __sigaddset(set, sig) \ - (__extension__ ({ \ - unsigned long int __mask = __sigmask (sig); \ - unsigned long int __word = __sigword (sig); \ - (set)->__val[__word] |= __mask; \ - (void)0; \ - })) - -# define __sigdelset(set, sig) \ - (__extension__ ({ \ - unsigned long int __mask = __sigmask (sig); \ - unsigned long int __word = __sigword (sig); \ - (set)->__val[__word] &= ~__mask; \ - (void)0; \ - })) +# define __NSIG_WORDS (_NSIG / (8 * sizeof (unsigned long int ))) + +static inline void +__sigemptyset (sigset_t *set) +{ + int cnt = __NSIG_WORDS; + while (--cnt >= 0) + set->__val[cnt] = 0; +} + +static inline void +__sigfillset (sigset_t *set) +{ + int cnt = __NSIG_WORDS; + while (--cnt >= 0) + set->__val[cnt] = ~0UL; +} + +static inline int +__sigisemptyset (const sigset_t *set) +{ + int cnt = __NSIG_WORDS; + int ret = set->__val[--cnt]; + while (ret == 0 && --cnt >= 0) + ret = set->__val[cnt]; + return ret == 0; +} + +static inline void +__sigandset (sigset_t *dest, const sigset_t *left, const sigset_t *right) +{ + int cnt = __NSIG_WORDS; + while (--cnt >= 0) + dest->__val[cnt] = left->__val[cnt] & right->__val[cnt]; +} + +static inline void +__sigorset (sigset_t *dest, const sigset_t *left, const sigset_t *right) +{ + int cnt = __NSIG_WORDS; + while (--cnt >= 0) + dest->__val[cnt] = left->__val[cnt] | right->__val[cnt]; +} + +static inline int +__sigismember (const sigset_t *set, int sig) +{ + unsigned long int mask = __sigmask (sig); + unsigned long int word = __sigword (sig); + return set->__val[word] & mask ? 1 : 0; +} + +static inline void +__sigaddset (sigset_t *set, int sig) +{ + unsigned long int mask = __sigmask (sig); + unsigned long int word = __sigword (sig); + set->__val[word] |= mask; +} + +static inline void +__sigdelset (sigset_t *set, int sig) +{ + unsigned long int mask = __sigmask (sig); + unsigned long int word = __sigword (sig); + set->__val[word] &= ~mask; +} #endif /* bits/sigsetops.h */