From patchwork Sat Aug 16 00:13:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118447 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 E45CD3858C40 for ; Sat, 16 Aug 2025 00:24:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E45CD3858C40 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 3961F385840B for ; Sat, 16 Aug 2025 00:14:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3961F385840B 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 3961F385840B 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=1755303262; cv=none; b=Jo3t+vF9VuvSvrikgWMdxsrsLUueh84pX8OKhsq6Zuq5XHhEn5jvOzLXoGQGnVfQy7NBA7xpgmrTe9KuIAKkU7D1gr/lJlspzoBz79lVk4O1zxVxs4HAu3A0dOqX0t/NQ9ZNQkvvlUBvU70ClJeHg+7cG/OS9zpVB3oUj1B6K+s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303262; c=relaxed/simple; bh=/wXnvx+tAVDvcQofxKlhv3GAmacAgObO2KBFOQL7S48=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=NvrUV6U1cQNmuWQgCapElhnvoAJRiKMcVNldQpUBGLZV/4wuuRXddtL6VGb6DUcjGfFWcCvpGceDxxG01AZ/5EL3HXoDp9L/n0EjAJAsZwvPGqnNsMIm/3FXsCLrBfi87eZbwOiDK+NbVcVxBNJWlx2TXsGSnNViP90kvYEwNU8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3961F385840B Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 58C33A5DC6; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) 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 s0yrhTUigG_H; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (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 95C7BA49A4; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yg-00000000WyD-36wR; Sat, 16 Aug 2025 02:14:06 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 12/19] htl: move pthread_getattr_np into libc. Date: Sat, 16 Aug 2025 02:13:58 +0200 Message-ID: <20250816001405.126154-13-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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: <20250815181500.107433-13-gfleury@disroot.org> --- htl/Makefile | 2 +- htl/Versions | 5 ++--- htl/pt-getattr.c | 9 ++++++++- sysdeps/htl/pthreadP.h | 1 + sysdeps/mach/hurd/i386/libc.abilist | 3 +++ sysdeps/mach/hurd/i386/libpthread.abilist | 1 - sysdeps/mach/hurd/x86_64/libc.abilist | 3 +++ sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 - 8 files changed, 18 insertions(+), 7 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index ecfa3c1779..64e484c589 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -26,7 +26,6 @@ LCLHDRS := libpthread-routines := \ pt-create \ - pt-getattr \ pt-detach \ pt-exit \ pt-initialize \ @@ -144,6 +143,7 @@ routines := \ pt-dealloc \ pt-destroy-specific \ pt-docancel \ + pt-getattr \ pt-getconcurrency \ pt-getcpuclockid \ pt-getschedparam \ diff --git a/htl/Versions b/htl/Versions index 0f22745914..c94bd61500 100644 --- a/htl/Versions +++ b/htl/Versions @@ -51,6 +51,7 @@ libc { pthread_condattr_getpshared; pthread_condattr_setclock; pthread_condattr_setpshared; + pthread_getattr_np; pthread_getconcurrency; pthread_key_create; pthread_key_delete; @@ -197,6 +198,7 @@ libc { GLIBC_2.43 { pthread_cancel; + pthread_getattr_np; pthread_getconcurrency; pthread_getcpuclockid; pthread_kill; @@ -293,8 +295,6 @@ libpthread { pthread_create; pthread_detach; pthread_exit; - pthread_getattr_np; - pthread_join; pthread_mutex_transfer_np; @@ -341,7 +341,6 @@ libpthread { __cthread_keycreate; __cthread_getspecific; __cthread_setspecific; - __pthread_getattr_np; __pthread_enable_asynccancel; __pthread_disable_asynccancel; } diff --git a/htl/pt-getattr.c b/htl/pt-getattr.c index a851514709..74b86ca767 100644 --- a/htl/pt-getattr.c +++ b/htl/pt-getattr.c @@ -21,6 +21,8 @@ #include #include +#include +#include /* Initialize thread attribute *ATTR with attributes corresponding to the already running thread THREAD. It shall be called on an uninitialized ATTR @@ -48,4 +50,9 @@ __pthread_getattr_np (pthread_t thread, pthread_attr_t *attr) return 0; } -weak_alias (__pthread_getattr_np, pthread_getattr_np) +libc_hidden_def (__pthread_getattr_np) +versioned_symbol (libc, __pthread_getattr_np, pthread_getattr_np, GLIBC_2_43); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libpthread, __pthread_getattr_np, pthread_getattr_np, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index dd9d77776f..0deea22e8a 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -196,6 +196,7 @@ libc_hidden_proto (__pthread_key_delete) int __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)); int __pthread_getattr_np (pthread_t, pthread_attr_t *); +libc_hidden_proto (__pthread_getattr_np) int __pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr); libc_hidden_proto (__pthread_attr_getstackaddr) diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index a676cd0f75..0cbff57785 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -73,6 +73,7 @@ GLIBC_2.12 pthread_condattr_init F GLIBC_2.12 pthread_condattr_setclock F GLIBC_2.12 pthread_condattr_setpshared F GLIBC_2.12 pthread_equal F +GLIBC_2.12 pthread_getattr_np F GLIBC_2.12 pthread_getconcurrency F GLIBC_2.12 pthread_getcpuclockid F GLIBC_2.12 pthread_getschedparam F @@ -2643,6 +2644,7 @@ GLIBC_2.42 uimaxabs F GLIBC_2.42 ulabs F GLIBC_2.42 ullabs F GLIBC_2.43 pthread_cancel F +GLIBC_2.43 pthread_getattr_np F GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F GLIBC_2.43 pthread_kill F @@ -2715,6 +2717,7 @@ HURD_CTHREADS_0.3 __mutex_lock_solid F HURD_CTHREADS_0.3 __mutex_trylock F HURD_CTHREADS_0.3 __mutex_unlock F HURD_CTHREADS_0.3 __mutex_unlock_solid F +HURD_CTHREADS_0.3 __pthread_getattr_np F HURD_CTHREADS_0.3 __spin_lock F HURD_CTHREADS_0.3 __spin_lock_init F HURD_CTHREADS_0.3 __spin_lock_solid F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 044fb1c355..3d22516688 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -22,7 +22,6 @@ GLIBC_2.12 pthread_atfork F GLIBC_2.12 pthread_create F GLIBC_2.12 pthread_detach F GLIBC_2.12 pthread_exit F -GLIBC_2.12 pthread_getattr_np F GLIBC_2.12 pthread_join F GLIBC_2.12 pthread_mutex_transfer_np F GLIBC_2.12 pthread_spin_destroy F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index dff8eee881..2b983e489d 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1556,6 +1556,7 @@ GLIBC_2.38 pthread_condattr_setclock F GLIBC_2.38 pthread_condattr_setpshared F GLIBC_2.38 pthread_equal F GLIBC_2.38 pthread_exit F +GLIBC_2.38 pthread_getattr_np F GLIBC_2.38 pthread_getconcurrency F GLIBC_2.38 pthread_getcpuclockid F GLIBC_2.38 pthread_getschedparam F @@ -2325,6 +2326,7 @@ GLIBC_2.42 uimaxabs F GLIBC_2.42 ulabs F GLIBC_2.42 ullabs F GLIBC_2.43 pthread_cancel F +GLIBC_2.43 pthread_getattr_np F GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F GLIBC_2.43 pthread_kill F @@ -2341,6 +2343,7 @@ HURD_CTHREADS_0.3 __mutex_lock_solid F HURD_CTHREADS_0.3 __mutex_trylock F HURD_CTHREADS_0.3 __mutex_unlock F HURD_CTHREADS_0.3 __mutex_unlock_solid F +HURD_CTHREADS_0.3 __pthread_getattr_np F HURD_CTHREADS_0.3 __spin_lock F HURD_CTHREADS_0.3 __spin_lock_init F HURD_CTHREADS_0.3 __spin_lock_solid F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index 66f06f82b3..cf45150539 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -40,7 +40,6 @@ GLIBC_2.38 pthread_clockjoin_np F GLIBC_2.38 pthread_create F GLIBC_2.38 pthread_detach F GLIBC_2.38 pthread_exit F -GLIBC_2.38 pthread_getattr_np F GLIBC_2.38 pthread_hurd_cond_timedwait_np F GLIBC_2.38 pthread_hurd_cond_wait_np F GLIBC_2.38 pthread_join F