From patchwork Tue Nov 19 00:56:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 101476 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 7DDE9385828B for ; Tue, 19 Nov 2024 00:57:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7DDE9385828B 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 10D7A3858CDA for ; Tue, 19 Nov 2024 00:56:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 10D7A3858CDA 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 10D7A3858CDA 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=1731977802; cv=none; b=fHa6v6L8nLkrcBY2frZFkGvbIwSSzssNWl4UnqgLBB28eJnWwuDJvQnZrn+0iZxaTwxWOTpsFNWkizymnEKE4KyQXsvT2miqQEvySd7O2tPzHeo7MKVeicEnVlL5VRHOvxZZb4RGMHFW5jYs1pzJhCK1u8IQErw6Y3Kbx3RYQQc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977802; c=relaxed/simple; bh=QkZVVV5j0K8/CMVm1gjWG5muc0nmd7ezMyxGG6czf48=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=SSpAb+QOPH0uv/ipQ1NMpTr0tY0d00YY6lJUL0KT8eEhgU9magVEYnUl21ZQZyrz6+B4byv6bm+FycG5vawC+BWWj76p6SYIePMrsqekhE19sD0NuHXrXLExZiMDd3uLGzw+F/ACHS9qS3xoPnMUipay20JeE3CpyKXyXNvpN8w= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 27229A1C0B; Tue, 19 Nov 2024 01:56:37 +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 LGT4vk4DZeMo; Tue, 19 Nov 2024 01:56:37 +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 9C499A1C14; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1tDCXk-0000000CrOl-0Q9w; Tue, 19 Nov 2024 01:56:36 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 06/13] htl: move pthread_attr_getstackaddr into libc. Date: Tue, 19 Nov 2024 01:56:27 +0100 Message-ID: <20241119005634.3065147-7-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> References: <20241119005634.3065147-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 Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 5 ++++- sysdeps/htl/pt-attr-getstackaddr.c | 8 +++++++- sysdeps/htl/pthreadP.h | 1 + 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(+), 5 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index a4d900d5ff..1340c1b688 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -26,7 +26,6 @@ LCLHDRS := libpthread-routines := \ pt-attr-getstack \ - pt-attr-getstackaddr \ pt-attr-init \ pt-attr-setguardsize \ pt-attr-setschedparam \ @@ -202,6 +201,7 @@ routines := \ pt-attr-getschedparam \ pt-attr-getschedpolicy \ pt-attr-getscope \ + pt-attr-getstackaddr \ pt-attr-getstacksize \ pt-attr-setdetachstate \ pt-attr-setinheritsched \ diff --git a/htl/Versions b/htl/Versions index deca0d4109..f72569c63d 100644 --- a/htl/Versions +++ b/htl/Versions @@ -17,6 +17,7 @@ libc { pthread_attr_getguardsize; pthread_attr_getscope; pthread_attr_getstacksize; + pthread_attr_getstackaddr; } GLIBC_2.21 { @@ -49,6 +50,7 @@ libc { GLIBC_2.41 { pthread_attr_getguardsize; pthread_attr_getstacksize; + pthread_attr_getstackaddr; } @@ -61,6 +63,7 @@ libc { __pthread_init_thread; __pthread_default_attr; __pthread_attr_getstacksize; + __pthread_attr_getstackaddr; } } @@ -89,7 +92,7 @@ libpthread { pthread_atfork; - pthread_attr_getstack; pthread_attr_getstackaddr; + pthread_attr_getstack; pthread_attr_init; pthread_attr_setguardsize; pthread_attr_setschedparam; diff --git a/sysdeps/htl/pt-attr-getstackaddr.c b/sysdeps/htl/pt-attr-getstackaddr.c index 2782ee3b85..86f5e8d14a 100644 --- a/sysdeps/htl/pt-attr-getstackaddr.c +++ b/sysdeps/htl/pt-attr-getstackaddr.c @@ -17,6 +17,7 @@ . */ #include +#include #include int @@ -25,4 +26,9 @@ __pthread_attr_getstackaddr (const pthread_attr_t *attr, void **stackaddr) *stackaddr = attr->__stackaddr; return 0; } -weak_alias (__pthread_attr_getstackaddr, pthread_attr_getstackaddr) +libc_hidden_def (__pthread_attr_getstackaddr) +versioned_symbol (libc, __pthread_attr_getstackaddr, pthread_attr_getstackaddr, GLIBC_2_41); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41) +compat_symbol (libpthread, __pthread_attr_getstackaddr,pthread_attr_getstackaddr, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 9aef867708..a397112f52 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -83,6 +83,7 @@ int __pthread_setcancelstate (int state, int *oldstate); int __pthread_getattr_np (pthread_t, pthread_attr_t *); int __pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr); +libc_hidden_proto (__pthread_attr_getstackaddr) int __pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr); int __pthread_attr_getstacksize (const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize); diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index cb577ababf..d93a0f403b 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -36,6 +36,7 @@ GLIBC_2.12 pthread_attr_getinheritsched F GLIBC_2.12 pthread_attr_getschedparam F GLIBC_2.12 pthread_attr_getschedpolicy F GLIBC_2.12 pthread_attr_getscope F +GLIBC_2.12 pthread_attr_getstackaddr F GLIBC_2.12 pthread_attr_getstacksize F GLIBC_2.12 pthread_attr_setdetachstate F GLIBC_2.12 pthread_attr_setinheritsched F @@ -2487,6 +2488,7 @@ GLIBC_2.4 renameat F GLIBC_2.4 symlinkat F GLIBC_2.4 unlinkat F GLIBC_2.41 pthread_attr_getguardsize F +GLIBC_2.41 pthread_attr_getstackaddr F GLIBC_2.41 pthread_attr_getstacksize F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 8d700ff448..fed162643b 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -23,7 +23,6 @@ GLIBC_2.12 ftrylockfile F GLIBC_2.12 funlockfile F GLIBC_2.12 pthread_atfork F GLIBC_2.12 pthread_attr_getstack F -GLIBC_2.12 pthread_attr_getstackaddr F GLIBC_2.12 pthread_attr_init F GLIBC_2.12 pthread_attr_setguardsize F GLIBC_2.12 pthread_attr_setschedparam F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index c0bf7367c6..242c40e81e 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1518,6 +1518,7 @@ GLIBC_2.38 pthread_attr_getinheritsched F GLIBC_2.38 pthread_attr_getschedparam F GLIBC_2.38 pthread_attr_getschedpolicy F GLIBC_2.38 pthread_attr_getscope F +GLIBC_2.38 pthread_attr_getstackaddr F GLIBC_2.38 pthread_attr_getstacksize F GLIBC_2.38 pthread_attr_init F GLIBC_2.38 pthread_attr_setdetachstate F @@ -2187,6 +2188,7 @@ GLIBC_2.39 stdc_trailing_zeros_ul F GLIBC_2.39 stdc_trailing_zeros_ull F GLIBC_2.39 stdc_trailing_zeros_us F GLIBC_2.41 pthread_attr_getguardsize F +GLIBC_2.41 pthread_attr_getstackaddr F GLIBC_2.41 pthread_attr_getstacksize F HURD_CTHREADS_0.3 __cthread_getspecific F HURD_CTHREADS_0.3 __cthread_keycreate F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index c0bfe11d03..a1f74eb9f0 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -40,7 +40,6 @@ GLIBC_2.38 mtx_timedlock F GLIBC_2.38 mtx_trylock F GLIBC_2.38 mtx_unlock F GLIBC_2.38 pthread_attr_getstack F -GLIBC_2.38 pthread_attr_getstackaddr F GLIBC_2.38 pthread_attr_init F GLIBC_2.38 pthread_attr_setguardsize F GLIBC_2.38 pthread_attr_setschedparam F