From patchwork Mon Feb 10 01:06:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 106215 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 0D00E3858424 for ; Mon, 10 Feb 2025 01:11:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0D00E3858424 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 74D0D3858288 for ; Mon, 10 Feb 2025 01:06:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 74D0D3858288 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 74D0D3858288 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=Ty06T27Rv75iliicp3bC+NEdqTcS4nR1n+mxjKW2oQAR8BAZL/AowVQwFGiY8SQ1Xc3PX4XcOdMSIZx/oseQuHG5NlNZ8fQO2ILqRSta5QFe+B8+5aSnQWia5zZMx9bYSW88PTXa9iiKDk8PJSGZPb1/qrof95oENwDKkAxtMmU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739149618; c=relaxed/simple; bh=cGGZWbicDoCBpqIuYmeLyXNUGBzbIS80hZtPXNYyfhs=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=u1NjWSN7k0BVSmB9fEL5Ac4b1UYynLbTbEOlgyYTWEmzRJ6hNxWKy8OXhf+p26NcvNCnv39JtkfhSOW6WpnkaX6Bh0sk3LFXqBna+RfJqqD30uBJGtfIrcz9V3nBrN2mRncm/XCYudZ6tQA4GwLYxKvyZBsfP7D53RbXDQ0uMNM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 74D0D3858288 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 02097A19C9; 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 s2Uci-ccEJDe; 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 8AC8AA19BC; Mon, 10 Feb 2025 02:06:56 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1thIGG-00000002jrW-06hq; 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 1/8] htl: move __pthread_default_barrierattr into libc. Date: Mon, 10 Feb 2025 02:06:48 +0100 Message-ID: <20250210010655.652923-2-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-2-gfleury@disroot.org> --- htl/Makefile | 2 +- htl/Versions | 1 + htl/pt-internal.h | 1 + sysdeps/htl/pt-barrier.c | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/htl/Makefile b/htl/Makefile index a4192a56b4..6404cba9b5 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -28,7 +28,6 @@ libpthread-routines := \ pt-barrier-destroy \ pt-barrier-init \ pt-barrier-wait \ - pt-barrier \ pt-barrierattr-destroy \ pt-barrierattr-init \ pt-barrierattr-getpshared \ @@ -161,6 +160,7 @@ routines := \ pt-attr-setstack \ pt-attr-setstackaddr \ pt-attr-setstacksize \ + pt-barrier \ pt-block \ pt-block-intr \ pt-cond \ diff --git a/htl/Versions b/htl/Versions index d8f1c7f437..5aff085806 100644 --- a/htl/Versions +++ b/htl/Versions @@ -147,6 +147,7 @@ libc { __pthread_attr_setstacksize; __pthread_attr_setstackaddr; __pthread_attr_setstack; + __pthread_default_barrierattr; __pthread_setcancelstate; __pthread_cond_broadcast; __pthread_cond_destroy; diff --git a/htl/pt-internal.h b/htl/pt-internal.h index d19579b33b..506eaec50c 100644 --- a/htl/pt-internal.h +++ b/htl/pt-internal.h @@ -328,6 +328,7 @@ libc_hidden_proto (__pthread_default_attr) /* Default barrier attributes. */ extern const struct __pthread_barrierattr __pthread_default_barrierattr; +libc_hidden_proto (__pthread_default_barrierattr) /* Default rdlock attributes. */ extern const struct __pthread_rwlockattr __pthread_default_rwlockattr; diff --git a/sysdeps/htl/pt-barrier.c b/sysdeps/htl/pt-barrier.c index 859c0848b6..e620a13feb 100644 --- a/sysdeps/htl/pt-barrier.c +++ b/sysdeps/htl/pt-barrier.c @@ -22,3 +22,4 @@ const struct __pthread_barrierattr __pthread_default_barrierattr = { __pshared: PTHREAD_PROCESS_PRIVATE }; +libc_hidden_data_def (__pthread_default_barrierattr) From patchwork Mon Feb 10 01:06:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 106214 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 5F97C3858424 for ; Mon, 10 Feb 2025 01:09:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F97C3858424 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 7130C3858283 for ; Mon, 10 Feb 2025 01:06:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7130C3858283 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 7130C3858283 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=grYIkjfB1R5yIbomIld4kxqrHLNntzTFHV21VttRuOon4ZyTPqStD7TF7X/5Ozib/iC+jfrkxjFmXO913rTHrLCx/iAlsLOVS4UveVQtpc9ayJkCU0FKyt0xFEcXfF78ieb7Z6FFE8fPQ+A9AZ5pSpCEERoldnZXjV+yTIfFxEo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739149618; c=relaxed/simple; bh=sJ3VzLuPWqiSWTbOZjE+N6QHBJBrxNBSEwF2JpEcrJI=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=s42EewGc/R8ps06FoAm7M5OzYTcH9gV/Nz8a3P6Hg0WRM3INLvXcthVY4ERy/rM8GKSp8T98jzy+20U4rGlhV67NlYSwxxDlHOL1k53P7haFUD6/JDnGv0WuwOXc0VnEYp3Vi9OIQLqgra+/H2xuL2VcKfJ/lCiuNpGhI6ypzWg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7130C3858283 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id D2188A19C1; 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 GyskblG0Xo8H; 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 899B0A03D4; Mon, 10 Feb 2025 02:06:56 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1thIGG-00000002jrZ-0CQE; 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 2/8] htl: move pthread_barrierattr_destroy into libc. Date: Mon, 10 Feb 2025 02:06:49 +0100 Message-ID: <20250210010655.652923-3-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, KAM_SHORT, 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-3-gfleury@disroot.org> --- htl/Makefile | 2 +- htl/Versions | 4 +++- sysdeps/htl/pt-barrierattr-destroy.c | 11 +++++++++-- 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, 19 insertions(+), 6 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 6404cba9b5..fc3c223943 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -28,7 +28,6 @@ libpthread-routines := \ pt-barrier-destroy \ pt-barrier-init \ pt-barrier-wait \ - pt-barrierattr-destroy \ pt-barrierattr-init \ pt-barrierattr-getpshared \ pt-barrierattr-setpshared \ @@ -161,6 +160,7 @@ routines := \ pt-attr-setstackaddr \ pt-attr-setstacksize \ pt-barrier \ + pt-barrierattr-destroy \ pt-block \ pt-block-intr \ pt-cond \ diff --git a/htl/Versions b/htl/Versions index 5aff085806..886ccb14c8 100644 --- a/htl/Versions +++ b/htl/Versions @@ -26,6 +26,7 @@ libc { pthread_attr_setscope; pthread_attr_setschedparam; pthread_attr_init; + pthread_barrierattr_destroy; pthread_cond_broadcast; pthread_cond_destroy; pthread_cond_init; @@ -124,6 +125,7 @@ libc { } GLIBC_2.42 { + pthread_barrierattr_destroy; pthread_mutex_consistent; pthread_mutex_consistent_np; pthread_mutex_getprioceiling; pthread_mutex_setprioceiling; @@ -203,7 +205,7 @@ libpthread { pthread_atfork; pthread_barrier_destroy; pthread_barrier_init; pthread_barrier_wait; - pthread_barrierattr_destroy; pthread_barrierattr_getpshared; + pthread_barrierattr_getpshared; pthread_barrierattr_init; pthread_barrierattr_setpshared; pthread_cancel; diff --git a/sysdeps/htl/pt-barrierattr-destroy.c b/sysdeps/htl/pt-barrierattr-destroy.c index 8e65db7cce..fcb98f6245 100644 --- a/sysdeps/htl/pt-barrierattr-destroy.c +++ b/sysdeps/htl/pt-barrierattr-destroy.c @@ -16,11 +16,18 @@ License along with the GNU C Library; if not, see . */ -#include +#include #include +#include int -pthread_barrierattr_destroy (pthread_barrierattr_t *attr) +__pthread_barrierattr_destroy (pthread_barrierattr_t *attr) { return 0; } +libc_hidden_def (__pthread_barrierattr_destroy) +versioned_symbol (libc, __pthread_barrierattr_destroy, pthread_barrierattr_destroy, GLIBC_2_42); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42) +compat_symbol (libpthread, __pthread_barrierattr_destroy, pthread_barrierattr_destroy, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 1a1b9ff39a..68972b86c1 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -31,6 +31,8 @@ extern void __pthread_init_static_tls (struct link_map *) attribute_hidden; /* These represent the interface used by glibc itself. */ +extern int __pthread_barrierattr_destroy (pthread_barrierattr_t *__attr); +libc_hidden_proto (__pthread_barrierattr_destroy) 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 30c01aaf23..72dfd665f6 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -49,6 +49,7 @@ GLIBC_2.12 pthread_attr_setscope F 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_cond_broadcast F GLIBC_2.12 pthread_cond_destroy F GLIBC_2.12 pthread_cond_init F @@ -2561,6 +2562,7 @@ GLIBC_2.41 pthread_mutexattr_setrobust F 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_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 0cefd91495..6d9ffec92c 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -25,7 +25,6 @@ GLIBC_2.12 pthread_atfork 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 GLIBC_2.12 pthread_barrierattr_setpshared F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 4f7ba3a700..b60abc1958 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1531,6 +1531,7 @@ GLIBC_2.38 pthread_attr_setscope F 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_cond_broadcast F GLIBC_2.38 pthread_cond_clockwait F GLIBC_2.38 pthread_cond_destroy F @@ -2244,6 +2245,7 @@ GLIBC_2.41 pthread_mutexattr_setrobust F 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_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 0812c7c735..860d406251 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -42,7 +42,6 @@ GLIBC_2.38 mtx_unlock 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 GLIBC_2.38 pthread_barrierattr_setpshared F 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 From patchwork Mon Feb 10 01:06:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 106210 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 438743857C7F for ; Mon, 10 Feb 2025 01:07:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 438743857C7F X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 782103858019 for ; Mon, 10 Feb 2025 01:06:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 782103858019 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 782103858019 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=xOoTZjvEyw/jN1RxJeLa6vKLS5zesgRa/src5LPtClDGYKdmixYb54dfTgXYkx5q6HoO/q+K5uZtrrgt43eDIfaUrL++OufDee1zWdP7KSRbFfnjWF7cbq8hLNXjYiqZi6scFjSO3HUSyHP9yPvsFuJhGqhxG4VGbc51I4+jH+E= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739149618; c=relaxed/simple; bh=XFwKYhqVXf+Wht0qKA7k/VCMo1uhRov8su03MfEgQYw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=OnZRM5Kd2lMXupwaLr0BImHIvJ7f34Nh8o5we3Z1ilLRKPEL5YIEw0Q17WZlfTZyoplI8I5M8TmyN6sy/UkmGeyJ0ct1JwLUyhHRkUWVu+cwj96ncWxHtp49cg6oqmntyYHnROQFm/BwMuvO/nQVb9qdzVlTUp17nsjZNOSCTiI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 782103858019 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 1A311A19BC; 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 X1ElejtzNXOG; 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 9AF99A1B9A; Mon, 10 Feb 2025 02:06:56 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1thIGG-00000002jrf-0OX7; 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 4/8] htl: move pthread_barrierattr_getpshared, pthread_barrierattr_setpshared into libc. Date: Mon, 10 Feb 2025 02:06:51 +0100 Message-ID: <20250210010655.652923-5-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-5-gfleury@disroot.org> --- htl/Makefile | 4 ++-- htl/Versions | 6 ++++-- sysdeps/htl/pt-barrierattr-getpshared.c | 9 ++++++++- sysdeps/htl/pt-barrierattr-setpshared.c | 9 ++++++++- sysdeps/htl/pthreadP.h | 6 ++++++ sysdeps/mach/hurd/i386/libc.abilist | 4 ++++ sysdeps/mach/hurd/i386/libpthread.abilist | 2 -- sysdeps/mach/hurd/x86_64/libc.abilist | 4 ++++ sysdeps/mach/hurd/x86_64/libpthread.abilist | 2 -- 9 files changed, 36 insertions(+), 10 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 7b2485471a..6194bf87b0 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -28,8 +28,6 @@ libpthread-routines := \ pt-barrier-destroy \ pt-barrier-init \ pt-barrier-wait \ - pt-barrierattr-getpshared \ - pt-barrierattr-setpshared \ pt-destroy-specific \ pt-init-specific \ pt-key-create \ @@ -160,7 +158,9 @@ routines := \ pt-attr-setstacksize \ pt-barrier \ pt-barrierattr-destroy \ + pt-barrierattr-getpshared \ pt-barrierattr-init \ + pt-barrierattr-setpshared \ pt-block \ pt-block-intr \ pt-cond \ diff --git a/htl/Versions b/htl/Versions index ccd2a6180b..cf8f86d764 100644 --- a/htl/Versions +++ b/htl/Versions @@ -27,7 +27,9 @@ libc { pthread_attr_setschedparam; pthread_attr_init; pthread_barrierattr_destroy; + pthread_barrierattr_getpshared; pthread_barrierattr_init; + pthread_barrierattr_setpshared; pthread_cond_broadcast; pthread_cond_destroy; pthread_cond_init; @@ -127,7 +129,9 @@ libc { GLIBC_2.42 { pthread_barrierattr_destroy; + pthread_barrierattr_getpshared; pthread_barrierattr_init; + pthread_barrierattr_setpshared; pthread_mutex_consistent; pthread_mutex_consistent_np; pthread_mutex_getprioceiling; pthread_mutex_setprioceiling; @@ -207,8 +211,6 @@ libpthread { pthread_atfork; pthread_barrier_destroy; pthread_barrier_init; pthread_barrier_wait; - pthread_barrierattr_getpshared; - pthread_barrierattr_setpshared; pthread_cancel; diff --git a/sysdeps/htl/pt-barrierattr-getpshared.c b/sysdeps/htl/pt-barrierattr-getpshared.c index 2ecf10c259..be739e7f79 100644 --- a/sysdeps/htl/pt-barrierattr-getpshared.c +++ b/sysdeps/htl/pt-barrierattr-getpshared.c @@ -18,11 +18,18 @@ #include #include +#include int -pthread_barrierattr_getpshared (const pthread_barrierattr_t *attr, +__pthread_barrierattr_getpshared (const pthread_barrierattr_t *attr, int *pshared) { *pshared = attr->__pshared; return 0; } +libc_hidden_def (__pthread_barrierattr_getpshared) +versioned_symbol (libc, __pthread_barrierattr_getpshared, pthread_barrierattr_getpshared, GLIBC_2_42); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42) +compat_symbol (libpthread, __pthread_barrierattr_getpshared, pthread_barrierattr_getpshared, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pt-barrierattr-setpshared.c b/sysdeps/htl/pt-barrierattr-setpshared.c index 5dd8aa1587..5816a440dd 100644 --- a/sysdeps/htl/pt-barrierattr-setpshared.c +++ b/sysdeps/htl/pt-barrierattr-setpshared.c @@ -18,9 +18,10 @@ #include #include +#include int -pthread_barrierattr_setpshared (pthread_barrierattr_t *attr, int pshared) +__pthread_barrierattr_setpshared (pthread_barrierattr_t *attr, int pshared) { switch (pshared) { @@ -35,4 +36,10 @@ pthread_barrierattr_setpshared (pthread_barrierattr_t *attr, int pshared) return EINVAL; } } +libc_hidden_def (__pthread_barrierattr_setpshared) +versioned_symbol (libc, __pthread_barrierattr_setpshared, pthread_barrierattr_setpshared, GLIBC_2_42); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42) +compat_symbol (libpthread, __pthread_barrierattr_setpshared, pthread_barrierattr_setpshared, GLIBC_2_12); +#endif stub_warning (pthread_barrierattr_setpshared) diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index c7a6298290..ae6a0cc7a6 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -33,8 +33,14 @@ 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_getpshared (const pthread_barrierattr_t *__attr, + int *__pshared); +libc_hidden_proto (__pthread_barrierattr_getpshared) extern int __pthread_barrierattr_init (pthread_barrierattr_t *__attr); libc_hidden_proto (__pthread_barrierattr_init) +extern int __pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, + int __pshared); +libc_hidden_proto (__pthread_barrierattr_setpshared) 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 eb141157db..dc8627667f 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -50,7 +50,9 @@ 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_getpshared F GLIBC_2.12 pthread_barrierattr_init F +GLIBC_2.12 pthread_barrierattr_setpshared F GLIBC_2.12 pthread_cond_broadcast F GLIBC_2.12 pthread_cond_destroy F GLIBC_2.12 pthread_cond_init F @@ -2564,7 +2566,9 @@ 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_getpshared F GLIBC_2.42 pthread_barrierattr_init F +GLIBC_2.42 pthread_barrierattr_setpshared 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 1083a7c001..65fcf5e435 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -25,8 +25,6 @@ GLIBC_2.12 pthread_atfork 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_getpshared F -GLIBC_2.12 pthread_barrierattr_setpshared 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 e7bada388e..8129eaf96c 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1532,7 +1532,9 @@ 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_getpshared F GLIBC_2.38 pthread_barrierattr_init F +GLIBC_2.38 pthread_barrierattr_setpshared F GLIBC_2.38 pthread_cond_broadcast F GLIBC_2.38 pthread_cond_clockwait F GLIBC_2.38 pthread_cond_destroy F @@ -2247,7 +2249,9 @@ 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_getpshared F GLIBC_2.42 pthread_barrierattr_init F +GLIBC_2.42 pthread_barrierattr_setpshared 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 97a4377079..89e10c557c 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -42,8 +42,6 @@ GLIBC_2.38 mtx_unlock 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_getpshared F -GLIBC_2.38 pthread_barrierattr_setpshared F GLIBC_2.38 pthread_cancel F GLIBC_2.38 pthread_clockjoin_np F GLIBC_2.38 pthread_create F From patchwork Mon Feb 10 01:06:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 106212 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 92A44385800F for ; Mon, 10 Feb 2025 01:07:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 92A44385800F 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 37D8E385842C for ; Mon, 10 Feb 2025 01:07:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 37D8E385842C 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 37D8E385842C 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=x6QBc8xA58gmrY40DjhM1p682BySHA4KHcGISFcZG71tEPBX/29vDWXByZEhJ1sODc+cLbn6ACnDwAMVlWb9iV24BNOqdSN8lVvC7n2Y0N9CDYs+24UAGBDozLeLKCOZROhosjwW+mNc63LmVasWfffHKURbvpmkquWwf6SYRgc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739149623; c=relaxed/simple; bh=j7tWUODfdTp8TLgbeidFlYiWRh61HUTtqvKZTTBbX98=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Adm7AFYEkfSN6svveZrX7bp8ROz/Bnt+r4+Dn5QO66Z8fLSTGLi0SYpk9x0FkhzWwpIQGR86h1bSfECmhyonb9vSZxPFb1/M5tAXwaItqu3jJdIUA/T/o9qJH8MSonM7/nP1FiJXz0qW8rtdTWq6fAjgwIgdNBOV+ad0R9U97GM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 37D8E385842C Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 22D84A1B9A; 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 hADtELzEgdHl; 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 A05C5A1BA1; Mon, 10 Feb 2025 02:06:56 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1thIGG-00000002jrj-0UXB; 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 5/8] htl: move pthread_barrier_destroy into libc. Date: Mon, 10 Feb 2025 02:06:52 +0100 Message-ID: <20250210010655.652923-6-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-6-gfleury@disroot.org> --- htl/Makefile | 2 +- htl/Versions | 4 +++- sysdeps/htl/pt-barrier-destroy.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 6194bf87b0..aa550109b6 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -25,7 +25,6 @@ SYSDEPS := lockfile LCLHDRS := libpthread-routines := \ - pt-barrier-destroy \ pt-barrier-init \ pt-barrier-wait \ pt-destroy-specific \ @@ -157,6 +156,7 @@ routines := \ pt-attr-setstackaddr \ pt-attr-setstacksize \ pt-barrier \ + pt-barrier-destroy \ pt-barrierattr-destroy \ pt-barrierattr-getpshared \ pt-barrierattr-init \ diff --git a/htl/Versions b/htl/Versions index cf8f86d764..c464d8eb53 100644 --- a/htl/Versions +++ b/htl/Versions @@ -26,6 +26,7 @@ libc { pthread_attr_setscope; pthread_attr_setschedparam; pthread_attr_init; + pthread_barrier_destroy; pthread_barrierattr_destroy; pthread_barrierattr_getpshared; pthread_barrierattr_init; @@ -128,6 +129,7 @@ libc { } GLIBC_2.42 { + pthread_barrier_destroy; pthread_barrierattr_destroy; pthread_barrierattr_getpshared; pthread_barrierattr_init; @@ -210,7 +212,7 @@ libpthread { pthread_atfork; - pthread_barrier_destroy; pthread_barrier_init; pthread_barrier_wait; + pthread_barrier_init; pthread_barrier_wait; pthread_cancel; diff --git a/sysdeps/htl/pt-barrier-destroy.c b/sysdeps/htl/pt-barrier-destroy.c index c480875ed2..e7ff7030f8 100644 --- a/sysdeps/htl/pt-barrier-destroy.c +++ b/sysdeps/htl/pt-barrier-destroy.c @@ -18,9 +18,16 @@ #include #include +#include int -pthread_barrier_destroy (pthread_barrier_t *barrier) +__pthread_barrier_destroy (pthread_barrier_t *barrier) { return 0; } +libc_hidden_def (__pthread_barrier_destroy) +versioned_symbol (libc, __pthread_barrier_destroy, pthread_barrier_destroy, GLIBC_2_42); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42) +compat_symbol (libpthread, __pthread_barrier_destroy, pthread_barrier_destroy, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index ae6a0cc7a6..548adbe4af 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -31,6 +31,8 @@ extern void __pthread_init_static_tls (struct link_map *) attribute_hidden; /* These represent the interface used by glibc itself. */ +extern int __pthread_barrier_destroy (pthread_barrier_t *__barrier); +libc_hidden_proto (__pthread_barrier_destroy) 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 dc8627667f..91fc92a5aa 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -49,6 +49,7 @@ GLIBC_2.12 pthread_attr_setscope F 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_barrier_destroy F GLIBC_2.12 pthread_barrierattr_destroy F GLIBC_2.12 pthread_barrierattr_getpshared F GLIBC_2.12 pthread_barrierattr_init F @@ -2565,6 +2566,7 @@ GLIBC_2.41 pthread_mutexattr_setrobust F 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_barrier_destroy 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 65fcf5e435..c779be25ba 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_destroy F GLIBC_2.12 pthread_barrier_init F GLIBC_2.12 pthread_barrier_wait F GLIBC_2.12 pthread_cancel F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 8129eaf96c..db01e3c58d 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1531,6 +1531,7 @@ GLIBC_2.38 pthread_attr_setscope F 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_barrier_destroy F GLIBC_2.38 pthread_barrierattr_destroy F GLIBC_2.38 pthread_barrierattr_getpshared F GLIBC_2.38 pthread_barrierattr_init F @@ -2248,6 +2249,7 @@ GLIBC_2.41 pthread_mutexattr_setrobust F 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_barrier_destroy 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 89e10c557c..51f7f72278 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_destroy F GLIBC_2.38 pthread_barrier_init F GLIBC_2.38 pthread_barrier_wait F GLIBC_2.38 pthread_cancel F From patchwork Mon Feb 10 01:06:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 106216 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 777C2385841D for ; Mon, 10 Feb 2025 01:12:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 777C2385841D X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 380383858023 for ; Mon, 10 Feb 2025 01:07:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 380383858023 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 380383858023 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=VHQBGZRh/f2l5ltsHkF66256mlMX9BYu4ZvCriIdjYNceuGK8HjPMuWFAPcIkxVzMzmva1JcHPvPWUOKyf/zzhYgbapXk0edGN4tMQnL7pfn+G59ZIdeFXsy1brWQD4Cda2Vs1yk6cDBUi8GwTsUYBttg1BXe5/EI2QnXWwLThM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739149623; c=relaxed/simple; bh=vH139oG6DEAIVyTHeVU/sGj/69Ktl8yJ/8zWkiU8LfU=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=LkjmGh8iHtpmiWyr4nMIeI9bOUDci3DnIXW2kmw+Mk0cd/essbJ7qNkxjKlQ6BfeXJkR+8Fr5U+vYCoFswdL+S8T5+AFCQWwk/6zcOoLmKyuyEDHuCEeLVx+C8bIR8pXwjElOmc+RT+W3IJgqD4tbWdI2/r9OukKjHeuYK/gYPk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 380383858023 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 37FB5A1BA1; 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 bUFzHqh8aUIy; 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 A5928A1BB4; Mon, 10 Feb 2025 02:06:56 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1thIGG-00000002jrm-0ad1; 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 6/8] htl: move pthread_barrier_init into libc. Date: Mon, 10 Feb 2025 02:06:53 +0100 Message-ID: <20250210010655.652923-7-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-7-gfleury@disroot.org> --- htl/Makefile | 2 +- htl/Versions | 4 +++- sysdeps/htl/pt-barrier-init.c | 10 ++++++++-- sysdeps/htl/pthreadP.h | 4 ++++ 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, 20 insertions(+), 6 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index aa550109b6..76d65a5348 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -25,7 +25,6 @@ SYSDEPS := lockfile LCLHDRS := libpthread-routines := \ - pt-barrier-init \ pt-barrier-wait \ pt-destroy-specific \ pt-init-specific \ @@ -157,6 +156,7 @@ routines := \ pt-attr-setstacksize \ pt-barrier \ pt-barrier-destroy \ + pt-barrier-init \ pt-barrierattr-destroy \ pt-barrierattr-getpshared \ pt-barrierattr-init \ diff --git a/htl/Versions b/htl/Versions index c464d8eb53..8ab21238e6 100644 --- a/htl/Versions +++ b/htl/Versions @@ -27,6 +27,7 @@ libc { pthread_attr_setschedparam; pthread_attr_init; pthread_barrier_destroy; + pthread_barrier_init; pthread_barrierattr_destroy; pthread_barrierattr_getpshared; pthread_barrierattr_init; @@ -130,6 +131,7 @@ libc { GLIBC_2.42 { pthread_barrier_destroy; + pthread_barrier_init; pthread_barrierattr_destroy; pthread_barrierattr_getpshared; pthread_barrierattr_init; @@ -212,7 +214,7 @@ libpthread { pthread_atfork; - pthread_barrier_init; pthread_barrier_wait; + pthread_barrier_wait; pthread_cancel; diff --git a/sysdeps/htl/pt-barrier-init.c b/sysdeps/htl/pt-barrier-init.c index 4854f7c183..0fc77c26eb 100644 --- a/sysdeps/htl/pt-barrier-init.c +++ b/sysdeps/htl/pt-barrier-init.c @@ -19,11 +19,11 @@ #include #include #include - +#include #include int -pthread_barrier_init (pthread_barrier_t *barrier, +__pthread_barrier_init (pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned count) { ASSERT_TYPE_SIZE (pthread_barrier_t, __SIZEOF_PTHREAD_BARRIER_T); @@ -51,3 +51,9 @@ pthread_barrier_init (pthread_barrier_t *barrier, *barrier->__attr = *attr; return 0; } +libc_hidden_def (__pthread_barrier_init) +versioned_symbol (libc, __pthread_barrier_init, pthread_barrier_init, GLIBC_2_42); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42) +compat_symbol (libpthread, __pthread_barrier_init, pthread_barrier_init, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 548adbe4af..cb28124443 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -33,6 +33,10 @@ extern void __pthread_init_static_tls (struct link_map *) attribute_hidden; extern int __pthread_barrier_destroy (pthread_barrier_t *__barrier); libc_hidden_proto (__pthread_barrier_destroy) +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_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 91fc92a5aa..2b994cfbe1 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_barrier_destroy F +GLIBC_2.12 pthread_barrier_init F GLIBC_2.12 pthread_barrierattr_destroy F GLIBC_2.12 pthread_barrierattr_getpshared F GLIBC_2.12 pthread_barrierattr_init F @@ -2567,6 +2568,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_barrier_destroy F +GLIBC_2.42 pthread_barrier_init 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 c779be25ba..ca80545f93 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_init F GLIBC_2.12 pthread_barrier_wait 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 db01e3c58d..d5984cc674 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_barrier_destroy F +GLIBC_2.38 pthread_barrier_init F GLIBC_2.38 pthread_barrierattr_destroy F GLIBC_2.38 pthread_barrierattr_getpshared F GLIBC_2.38 pthread_barrierattr_init F @@ -2250,6 +2251,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_barrier_destroy F +GLIBC_2.42 pthread_barrier_init 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 51f7f72278..848db31b53 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_init F GLIBC_2.38 pthread_barrier_wait F GLIBC_2.38 pthread_cancel F GLIBC_2.38 pthread_clockjoin_np F 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 From patchwork Mon Feb 10 01:06:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 106217 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 B570B3857C6D for ; Mon, 10 Feb 2025 01:13:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B570B3857C6D X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 879333858289 for ; Mon, 10 Feb 2025 01:07:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 879333858289 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 879333858289 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=i7IMMumtsne0BO7IDIjkuoYPx/pxNwfeXt1n17++PUAzW/GcvjsnXKUj8sgYDpEc8zKKMQsSXqUB29ldXbFCbFFh6YX3xPt87g7wzL9LyxZO1PNpOHboPcjPYc/YtuwC7YsbsRWdwbTRpjJF7iURLKSNtHcrV7BnEu2o2YtkOYc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739149623; c=relaxed/simple; bh=x90Uz4BNc6A2p/BBTjePILzYNsolNMURVXNvbGqJb5M=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=NXxLqYZCUY6DuP6nDTKnxDR875YVWwIb7syUVCXeBwgGlVSoYGGJ/e2Vq+hAyfVs7Ws3n5lnTX8wcT8euE6av3nsAiAkt50r1co3dO8/W/K3yfR+vBM5xinewYpYb4d5N+n1Bmt5VOBjyyJ0hwYFUbX3ztCalLsyyA2APZ4lu7g= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 879333858289 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 4449FA1BB4; 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 UNRyj6HzXEpw; 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 AE7F7A1BC2; Mon, 10 Feb 2025 02:06:56 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1thIGG-00000002jrs-0miI; 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 8/8] htl: stop exporting __pthread_default_barrierattr. Date: Mon, 10 Feb 2025 02:06:55 +0100 Message-ID: <20250210010655.652923-9-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 since all symbol that use it are now in libc Message-ID: <20250209200108.865599-9-gfleury@disroot.org> --- htl/Versions | 1 - htl/pt-internal.h | 1 - sysdeps/htl/pt-barrier.c | 1 - 3 files changed, 3 deletions(-) diff --git a/htl/Versions b/htl/Versions index 1a69d44d77..dd3be82e9e 100644 --- a/htl/Versions +++ b/htl/Versions @@ -161,7 +161,6 @@ libc { __pthread_attr_setstacksize; __pthread_attr_setstackaddr; __pthread_attr_setstack; - __pthread_default_barrierattr; __pthread_setcancelstate; __pthread_cond_broadcast; __pthread_cond_destroy; diff --git a/htl/pt-internal.h b/htl/pt-internal.h index 506eaec50c..d19579b33b 100644 --- a/htl/pt-internal.h +++ b/htl/pt-internal.h @@ -328,7 +328,6 @@ libc_hidden_proto (__pthread_default_attr) /* Default barrier attributes. */ extern const struct __pthread_barrierattr __pthread_default_barrierattr; -libc_hidden_proto (__pthread_default_barrierattr) /* Default rdlock attributes. */ extern const struct __pthread_rwlockattr __pthread_default_rwlockattr; diff --git a/sysdeps/htl/pt-barrier.c b/sysdeps/htl/pt-barrier.c index e620a13feb..859c0848b6 100644 --- a/sysdeps/htl/pt-barrier.c +++ b/sysdeps/htl/pt-barrier.c @@ -22,4 +22,3 @@ const struct __pthread_barrierattr __pthread_default_barrierattr = { __pshared: PTHREAD_PROCESS_PRIVATE }; -libc_hidden_data_def (__pthread_default_barrierattr)