From patchwork Tue Nov 19 00:56:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 101481 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 CE5513858294 for ; Tue, 19 Nov 2024 00:59:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CE5513858294 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 1AECE3858C62 for ; Tue, 19 Nov 2024 00:56:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1AECE3858C62 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 1AECE3858C62 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=1731977803; cv=none; b=tx5fmnLgkdPJet7WptMaNdiCrqYGjk1oAjEdUJNlTeaDte1DjtIdXBdf2bBnVc3diJT6ta0x3PEl87cDRZludVpyFBaB2AqncNb9MKeXhBOCBtbPUM+FhW3w6l69ml/cSx6LeCxNKEgX80xK0RCmbk1s1ouIDwBKZfpjqZPdKbU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977803; c=relaxed/simple; bh=+45NtPksrLVhNA1Kq+dvHB/xI9E/kBcygWVW4WN5nc8=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=hCM23jmN/N2Lzc5nQmoAEpdSIVEk072k6pXXbpE71kpRjd/jTWmYBujrIbZyXPj936XegL+ayDDVxbIEphkojfaJVTCLs+TQhrqiFcfQTPbf9VUcr236wX84LI3k3lejXcy+2rAcYyF2Rt3cDpP/Bfhb2YHRA2NxvECaWN2TtJw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1AECE3858C62 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 291BCA1C13; 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 7QCIz6nKvU2A; 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 A04BAA1C24; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1tDCXk-0000000CrOp-0Zxp; 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 07/13] htl: move pthread_attr_getstack into libc. Date: Tue, 19 Nov 2024 01:56:28 +0100 Message-ID: <20241119005634.3065147-8-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, 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-getstack.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, 16 insertions(+), 6 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 1340c1b688..d9faf5080c 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -25,7 +25,6 @@ SYSDEPS := lockfile LCLHDRS := libpthread-routines := \ - pt-attr-getstack \ pt-attr-init \ pt-attr-setguardsize \ pt-attr-setschedparam \ @@ -201,6 +200,7 @@ routines := \ pt-attr-getschedparam \ pt-attr-getschedpolicy \ pt-attr-getscope \ + pt-attr-getstack \ pt-attr-getstackaddr \ pt-attr-getstacksize \ pt-attr-setdetachstate \ diff --git a/htl/Versions b/htl/Versions index f72569c63d..05b7765efa 100644 --- a/htl/Versions +++ b/htl/Versions @@ -18,6 +18,7 @@ libc { pthread_attr_getscope; pthread_attr_getstacksize; pthread_attr_getstackaddr; + pthread_attr_getstack; } GLIBC_2.21 { @@ -51,6 +52,7 @@ libc { pthread_attr_getguardsize; pthread_attr_getstacksize; pthread_attr_getstackaddr; + pthread_attr_getstack; } @@ -64,6 +66,7 @@ libc { __pthread_default_attr; __pthread_attr_getstacksize; __pthread_attr_getstackaddr; + __pthread_attr_getstack; } } @@ -92,7 +95,6 @@ libpthread { pthread_atfork; - pthread_attr_getstack; pthread_attr_init; pthread_attr_setguardsize; pthread_attr_setschedparam; @@ -211,7 +213,6 @@ libpthread { __pthread_getspecific; __pthread_setspecific; __pthread_getattr_np; - __pthread_attr_getstack; __pthread_mutex_init; __pthread_mutex_destroy; __pthread_mutex_timedlock; diff --git a/sysdeps/htl/pt-attr-getstack.c b/sysdeps/htl/pt-attr-getstack.c index 42ab5fdd19..1a4baa3ec6 100644 --- a/sysdeps/htl/pt-attr-getstack.c +++ b/sysdeps/htl/pt-attr-getstack.c @@ -18,6 +18,7 @@ #include #include +#include #include int @@ -28,4 +29,9 @@ __pthread_attr_getstack (const pthread_attr_t *attr, __pthread_attr_getstacksize (attr, stacksize); return 0; } -weak_alias (__pthread_attr_getstack, pthread_attr_getstack) +libc_hidden_def (__pthread_attr_getstack) +versioned_symbol (libpthread, __pthread_attr_getstack, pthread_attr_getstack, GLIBC_2_41); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41) +compat_symbol (libpthread, __pthread_attr_getstack, pthread_attr_getstack, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index a397112f52..6cdafe7315 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -92,6 +92,7 @@ int __pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize); int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize); int __pthread_attr_getstack (const pthread_attr_t *, void **, size_t *); +libc_hidden_proto (__pthread_attr_getstack) void __pthread_testcancel (void); #define __pthread_raise_internal(__sig) raise (__sig) diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index d93a0f403b..5ecf2a0a50 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_getstack F GLIBC_2.12 pthread_attr_getstackaddr F GLIBC_2.12 pthread_attr_getstacksize F GLIBC_2.12 pthread_attr_setdetachstate F @@ -2488,6 +2489,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_getstack F GLIBC_2.41 pthread_attr_getstackaddr F GLIBC_2.41 pthread_attr_getstacksize F GLIBC_2.5 __readlinkat_chk F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index fed162643b..2f50e32937 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_attr_getstack 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 242c40e81e..3e829c3b8f 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_getstack F GLIBC_2.38 pthread_attr_getstackaddr F GLIBC_2.38 pthread_attr_getstacksize F GLIBC_2.38 pthread_attr_init F @@ -2188,6 +2189,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_getstack F GLIBC_2.41 pthread_attr_getstackaddr F GLIBC_2.41 pthread_attr_getstacksize F HURD_CTHREADS_0.3 __cthread_getspecific F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index a1f74eb9f0..e3c04abe73 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_attr_getstack F GLIBC_2.38 pthread_attr_init F GLIBC_2.38 pthread_attr_setguardsize F GLIBC_2.38 pthread_attr_setschedparam F