From patchwork Mon Feb 10 01:06:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 106211 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 13AA63857C6C for ; Mon, 10 Feb 2025 01:07:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13AA63857C6C 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 8C9463858031 for ; Mon, 10 Feb 2025 01:06:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8C9463858031 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 8C9463858031 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=1739149618; cv=none; b=ExEg4CwWdJjXX514E2LyuvKubbMiU8FdoZJ330t3ShTwYfsFamWr0EeJ/j/E/Cp1VX6gwSbnjYj2i/8NpbnF8aAvgGgCDGo2/F4+aREAaloeuk45iTy4LO+G1JwcVz+F1OxtAAIms826vio/juzYB3RnmfKwjbcrf1guUCwk2cc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739149618; c=relaxed/simple; bh=rEC7ZJNBEJOskEqD++rP+gArFnMFllUUrifgoYP/0bg=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=LROiH3yGmgS/59vGBI/GXD4xU72EWnVJvwxjxQhtglkl0R+t4z5Zez2IxhrfNuvKJ2zBg69bydDvf5t9FzaTm8WMQRC4iSjPmU5KrDuFLwak6mwvkORgiTaPCIyX7bRU1fX4WWe02WK/tK75pE+JVC3yrLy2MZejmsNHaOi9u9c= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8C9463858031 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id BE707A1BC7; Mon, 10 Feb 2025 02:06:56 +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 yQUa1IOBgK3i; Mon, 10 Feb 2025 02:06:56 +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 90E74A19C1; Mon, 10 Feb 2025 02:06:56 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1thIGG-00000002jrc-0I3j; 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 3/8] htl: move pthread_barrierattr_init into libc. Date: Mon, 10 Feb 2025 02:06:50 +0100 Message-ID: <20250210010655.652923-4-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-4-gfleury@disroot.org> --- htl/Makefile | 2 +- htl/Versions | 4 +++- sysdeps/htl/pt-barrierattr-init.c | 9 ++++++++- 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, 18 insertions(+), 5 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index fc3c223943..7b2485471a 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -28,7 +28,6 @@ libpthread-routines := \ pt-barrier-destroy \ pt-barrier-init \ pt-barrier-wait \ - pt-barrierattr-init \ pt-barrierattr-getpshared \ pt-barrierattr-setpshared \ pt-destroy-specific \ @@ -161,6 +160,7 @@ routines := \ pt-attr-setstacksize \ pt-barrier \ pt-barrierattr-destroy \ + pt-barrierattr-init \ pt-block \ pt-block-intr \ pt-cond \ diff --git a/htl/Versions b/htl/Versions index 886ccb14c8..ccd2a6180b 100644 --- a/htl/Versions +++ b/htl/Versions @@ -27,6 +27,7 @@ libc { pthread_attr_setschedparam; pthread_attr_init; pthread_barrierattr_destroy; + pthread_barrierattr_init; pthread_cond_broadcast; pthread_cond_destroy; pthread_cond_init; @@ -126,6 +127,7 @@ libc { GLIBC_2.42 { pthread_barrierattr_destroy; + pthread_barrierattr_init; pthread_mutex_consistent; pthread_mutex_consistent_np; pthread_mutex_getprioceiling; pthread_mutex_setprioceiling; @@ -206,7 +208,7 @@ libpthread { pthread_barrier_destroy; pthread_barrier_init; pthread_barrier_wait; pthread_barrierattr_getpshared; - pthread_barrierattr_init; pthread_barrierattr_setpshared; + pthread_barrierattr_setpshared; pthread_cancel; diff --git a/sysdeps/htl/pt-barrierattr-init.c b/sysdeps/htl/pt-barrierattr-init.c index 1d2f162b83..5a520bb989 100644 --- a/sysdeps/htl/pt-barrierattr-init.c +++ b/sysdeps/htl/pt-barrierattr-init.c @@ -18,12 +18,19 @@ #include #include +#include int -pthread_barrierattr_init (pthread_barrierattr_t *attr) +__pthread_barrierattr_init (pthread_barrierattr_t *attr) { ASSERT_TYPE_SIZE (pthread_barrierattr_t, __SIZEOF_PTHREAD_BARRIERATTR_T); *attr = __pthread_default_barrierattr; return 0; } +libc_hidden_def (__pthread_barrierattr_init) +versioned_symbol (libc, __pthread_barrierattr_init, pthread_barrierattr_init, GLIBC_2_42); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42) +compat_symbol (libpthread, __pthread_barrierattr_init, pthread_barrierattr_init, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 68972b86c1..c7a6298290 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -33,6 +33,8 @@ extern void __pthread_init_static_tls (struct link_map *) attribute_hidden; extern int __pthread_barrierattr_destroy (pthread_barrierattr_t *__attr); libc_hidden_proto (__pthread_barrierattr_destroy) +extern int __pthread_barrierattr_init (pthread_barrierattr_t *__attr); +libc_hidden_proto (__pthread_barrierattr_init) extern int __pthread_mutex_init (pthread_mutex_t *__mutex, const pthread_mutexattr_t *__attr); libc_hidden_proto (__pthread_mutex_init) extern int __pthread_mutex_clocklock (pthread_mutex_t *__mutex, clockid_t __clockid, diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 72dfd665f6..eb141157db 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -50,6 +50,7 @@ GLIBC_2.12 pthread_attr_setstack F GLIBC_2.12 pthread_attr_setstackaddr F GLIBC_2.12 pthread_attr_setstacksize F GLIBC_2.12 pthread_barrierattr_destroy F +GLIBC_2.12 pthread_barrierattr_init F GLIBC_2.12 pthread_cond_broadcast F GLIBC_2.12 pthread_cond_destroy F GLIBC_2.12 pthread_cond_init F @@ -2563,6 +2564,7 @@ GLIBC_2.41 pthread_mutexattr_setrobust_np F GLIBC_2.41 pthread_mutexattr_settype F GLIBC_2.41 pthread_sigmask F GLIBC_2.42 pthread_barrierattr_destroy F +GLIBC_2.42 pthread_barrierattr_init F GLIBC_2.42 pthread_mutex_consistent F GLIBC_2.42 pthread_mutex_consistent_np F GLIBC_2.42 pthread_mutex_getprioceiling F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 6d9ffec92c..1083a7c001 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -26,7 +26,6 @@ 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_getpshared F -GLIBC_2.12 pthread_barrierattr_init F GLIBC_2.12 pthread_barrierattr_setpshared F GLIBC_2.12 pthread_cancel F GLIBC_2.12 pthread_create F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index b60abc1958..e7bada388e 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1532,6 +1532,7 @@ GLIBC_2.38 pthread_attr_setstack F GLIBC_2.38 pthread_attr_setstackaddr F GLIBC_2.38 pthread_attr_setstacksize F GLIBC_2.38 pthread_barrierattr_destroy F +GLIBC_2.38 pthread_barrierattr_init F GLIBC_2.38 pthread_cond_broadcast F GLIBC_2.38 pthread_cond_clockwait F GLIBC_2.38 pthread_cond_destroy F @@ -2246,6 +2247,7 @@ GLIBC_2.41 pthread_mutexattr_setrobust_np F GLIBC_2.41 pthread_mutexattr_settype F GLIBC_2.41 pthread_sigmask F GLIBC_2.42 pthread_barrierattr_destroy F +GLIBC_2.42 pthread_barrierattr_init F GLIBC_2.42 pthread_mutex_consistent F GLIBC_2.42 pthread_mutex_consistent_np F GLIBC_2.42 pthread_mutex_getprioceiling F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index 860d406251..97a4377079 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -43,7 +43,6 @@ 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_getpshared F -GLIBC_2.38 pthread_barrierattr_init F GLIBC_2.38 pthread_barrierattr_setpshared F GLIBC_2.38 pthread_cancel F GLIBC_2.38 pthread_clockjoin_np F