From patchwork Mon Feb 10 01:06:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 106213 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 53C883857810 for ; Mon, 10 Feb 2025 01:07:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 53C883857810 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 8B924385800F for ; Mon, 10 Feb 2025 01:07:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8B924385800F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8B924385800F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739149623; cv=none; b=tb1svTcnOTwk/E+2ZtglGqxXBnhEr/Yiui9KpfTBmQmy/7Qlz6FlUDhaCfmnbgpoWljw6e/JoDPQXDiVLWyHMKUNYSFYeOz4juilLeQlyBITpQzyLcH05RZvT0qjEcaMkHBETwimLr7bwf5pyxn3N2zfgV6SaSbgAUhOG8wUuAQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739149623; c=relaxed/simple; bh=RqOHiPnBNsI1luFyphX3ASY8AQyjAbudWL5cYqiFPn0=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=VFtqwuYN+LVUdAGH34KcMUQSgHNvMJcZED28tZT3a4VzsKGBavmYnefis3eqUssZEXAAUwKbZqWOdhaMxEz6hh0TvGCjeSSH61JyTjZp6kTJb4XShX/nA2/Ws0Z8uMoTVZt/HsUVjdPl9Q7x+UJxkjFopVITUkMEohq2SG7qeDs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B924385800F Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 56BE4A1BC2; Mon, 10 Feb 2025 02:06:57 +0100 (CET) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2cVDIml-Cbum; Mon, 10 Feb 2025 02:06:57 +0100 (CET) Received: from begin (aamiens-653-1-40-48.w83-192.abo.wanadoo.fr [83.192.199.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id B13A8A1BC6; Mon, 10 Feb 2025 02:06:56 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1thIGG-00000002jrp-0gKI; Mon, 10 Feb 2025 02:06:56 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 7/8] htl: move pthread_barrier_wait into libc. Date: Mon, 10 Feb 2025 02:06:54 +0100 Message-ID: <20250210010655.652923-8-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250210010655.652923-1-samuel.thibault@ens-lyon.org> References: <20250210010655.652923-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Message-ID: <20250209200108.865599-8-gfleury@disroot.org> --- htl/Makefile | 2 +- htl/Versions | 4 ++-- sysdeps/htl/pt-barrier-wait.c | 10 ++++++++-- sysdeps/htl/pthreadP.h | 2 ++ sysdeps/mach/hurd/i386/libc.abilist | 2 ++ sysdeps/mach/hurd/i386/libpthread.abilist | 1 - sysdeps/mach/hurd/x86_64/libc.abilist | 2 ++ sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 - 8 files changed, 17 insertions(+), 7 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 76d65a5348..2b2a49c7b7 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -25,7 +25,6 @@ SYSDEPS := lockfile LCLHDRS := libpthread-routines := \ - pt-barrier-wait \ pt-destroy-specific \ pt-init-specific \ pt-key-create \ @@ -157,6 +156,7 @@ routines := \ pt-barrier \ pt-barrier-destroy \ pt-barrier-init \ + pt-barrier-wait \ pt-barrierattr-destroy \ pt-barrierattr-getpshared \ pt-barrierattr-init \ diff --git a/htl/Versions b/htl/Versions index 8ab21238e6..1a69d44d77 100644 --- a/htl/Versions +++ b/htl/Versions @@ -28,6 +28,7 @@ libc { pthread_attr_init; pthread_barrier_destroy; pthread_barrier_init; + pthread_barrier_wait; pthread_barrierattr_destroy; pthread_barrierattr_getpshared; pthread_barrierattr_init; @@ -132,6 +133,7 @@ libc { GLIBC_2.42 { pthread_barrier_destroy; pthread_barrier_init; + pthread_barrier_wait; pthread_barrierattr_destroy; pthread_barrierattr_getpshared; pthread_barrierattr_init; @@ -214,8 +216,6 @@ libpthread { pthread_atfork; - pthread_barrier_wait; - pthread_cancel; pthread_create; pthread_detach; pthread_exit; diff --git a/sysdeps/htl/pt-barrier-wait.c b/sysdeps/htl/pt-barrier-wait.c index ec5b2262fd..7a106f2b7f 100644 --- a/sysdeps/htl/pt-barrier-wait.c +++ b/sysdeps/htl/pt-barrier-wait.c @@ -18,11 +18,11 @@ #include #include - +#include #include int -pthread_barrier_wait (pthread_barrier_t *barrier) +__pthread_barrier_wait (pthread_barrier_t *barrier) { __pthread_spin_wait (&barrier->__lock); if (--barrier->__pending == 0) @@ -68,3 +68,9 @@ pthread_barrier_wait (pthread_barrier_t *barrier) return 0; } } +libc_hidden_def (__pthread_barrier_wait) +versioned_symbol (libc, __pthread_barrier_wait, pthread_barrier_wait, GLIBC_2_42); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42) +compat_symbol (libpthread, __pthread_barrier_wait, pthread_barrier_wait, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index cb28124443..9ded2f8576 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -37,6 +37,8 @@ extern int __pthread_barrier_init (pthread_barrier_t *__barrier, const pthread_barrierattr_t *__attr, unsigned __count); libc_hidden_proto (__pthread_barrier_init) +extern int __pthread_barrier_wait (pthread_barrier_t *__barrier); +libc_hidden_proto (__pthread_barrier_wait) extern int __pthread_barrierattr_destroy (pthread_barrierattr_t *__attr); libc_hidden_proto (__pthread_barrierattr_destroy) extern int __pthread_barrierattr_getpshared (const pthread_barrierattr_t *__attr, diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 2b994cfbe1..0a100f876d 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -51,6 +51,7 @@ GLIBC_2.12 pthread_attr_setstackaddr F GLIBC_2.12 pthread_attr_setstacksize F GLIBC_2.12 pthread_barrier_destroy F GLIBC_2.12 pthread_barrier_init F +GLIBC_2.12 pthread_barrier_wait F GLIBC_2.12 pthread_barrierattr_destroy F GLIBC_2.12 pthread_barrierattr_getpshared F GLIBC_2.12 pthread_barrierattr_init F @@ -2569,6 +2570,7 @@ GLIBC_2.41 pthread_mutexattr_settype F GLIBC_2.41 pthread_sigmask F GLIBC_2.42 pthread_barrier_destroy F GLIBC_2.42 pthread_barrier_init F +GLIBC_2.42 pthread_barrier_wait F GLIBC_2.42 pthread_barrierattr_destroy F GLIBC_2.42 pthread_barrierattr_getpshared F GLIBC_2.42 pthread_barrierattr_init F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index ca80545f93..d85b9d6912 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -22,7 +22,6 @@ GLIBC_2.12 flockfile F GLIBC_2.12 ftrylockfile F GLIBC_2.12 funlockfile F GLIBC_2.12 pthread_atfork F -GLIBC_2.12 pthread_barrier_wait F GLIBC_2.12 pthread_cancel F GLIBC_2.12 pthread_create F GLIBC_2.12 pthread_detach F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index d5984cc674..2266d3c846 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1533,6 +1533,7 @@ GLIBC_2.38 pthread_attr_setstackaddr F GLIBC_2.38 pthread_attr_setstacksize F GLIBC_2.38 pthread_barrier_destroy F GLIBC_2.38 pthread_barrier_init F +GLIBC_2.38 pthread_barrier_wait F GLIBC_2.38 pthread_barrierattr_destroy F GLIBC_2.38 pthread_barrierattr_getpshared F GLIBC_2.38 pthread_barrierattr_init F @@ -2252,6 +2253,7 @@ GLIBC_2.41 pthread_mutexattr_settype F GLIBC_2.41 pthread_sigmask F GLIBC_2.42 pthread_barrier_destroy F GLIBC_2.42 pthread_barrier_init F +GLIBC_2.42 pthread_barrier_wait F GLIBC_2.42 pthread_barrierattr_destroy F GLIBC_2.42 pthread_barrierattr_getpshared F GLIBC_2.42 pthread_barrierattr_init F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index 848db31b53..37b6190c13 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -39,7 +39,6 @@ GLIBC_2.38 mtx_lock F GLIBC_2.38 mtx_timedlock F GLIBC_2.38 mtx_trylock F GLIBC_2.38 mtx_unlock F -GLIBC_2.38 pthread_barrier_wait F GLIBC_2.38 pthread_cancel F GLIBC_2.38 pthread_clockjoin_np F GLIBC_2.38 pthread_create F