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