From patchwork Mon Nov 18 11:21:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 101431 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 20655385B525 for ; Mon, 18 Nov 2024 11:26:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20655385B525 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=disroot.org header.i=@disroot.org header.a=rsa-sha256 header.s=mail header.b=iaHTQT6+ X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) by sourceware.org (Postfix) with ESMTPS id 41762385B508 for ; Mon, 18 Nov 2024 11:22:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 41762385B508 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=disroot.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 41762385B508 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928938; cv=none; b=UCjlKRHVJt5jkBHR4+N9IX3K4hopIx3NGaskrpXoGeoHy7RLLubDXFAOFOZOaQRvfmiEmaHcEDqbseqtUulc3cAlFVe9Z16MhDffKARkBbqtW0xeCXDheC9KaeU49xcvBaZT/l1qnu1ljtRuZft2id8BWgIsuMMRyPvmqv1Yzpw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928938; c=relaxed/simple; bh=YXJQ9yqcUKVP4BOYiwGDymReijbU+laeIEEYkes8BCY=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=BTiXKo/wx6PCQOZbtZQkJPsBX7zp6X9a4MgwmBJ6CiJaWGbesPqNICjrAsnL/+jtHLfG3k/AhzUoijAC9L+2s9wAZvg46DLhb29ahdcU6eKf9pCNjyxzB7n0R2RVkhDoN0fvVnhM3qyCrV/CfWk/ngf/bbic6ieL3VPniF0SIsA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id C7E912521A; Mon, 18 Nov 2024 12:22:16 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 0yjqezPdZhLd; Mon, 18 Nov 2024 12:22:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1731928932; bh=YXJQ9yqcUKVP4BOYiwGDymReijbU+laeIEEYkes8BCY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=iaHTQT6+DcIAROVN02pmkPBe3BMt3QfP/jbTNu+ZWzE5qd9bBiPcxZ7ejvBco+SuP 4qht5/rq8bN18sfbuVauDjBPvMliaQgWq2QleL31eaUNS+Ku4jajMS7Ga/BowYghSf qcet4q4TwiadivXkNrJNPpP/FC+ZWcgjpoeA5ML7nlXPLUzetcqXt0X16q8UflmMVl BHHcFdpm23ZLOdiOroGv3dF5Y6HsUE0DfxwfnDZitPUsnKMr7xqBQ4TOS9on+NuZB0 g3OxBrS+xmdlp+zCYQhBkYRpnCzwVC5rrhjgobN9KoxtMc8nUH5vO5S8A+NzpQUzm+ 6lpSC2hMCL6uw== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 01/13] htl: move pthread_attr_destroy into libc. Date: Mon, 18 Nov 2024 13:21:33 +0200 Message-Id: <20241118112145.50259-2-gfleury@disroot.org> In-Reply-To: <20241118112145.50259-1-gfleury@disroot.org> References: <20241118112145.50259-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, 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 Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 2 +- htl/forward.c | 2 -- htl/pt-initialize.c | 1 - sysdeps/htl/pt-attr-destroy.c | 7 ++++++- sysdeps/htl/pthread-functions.h | 1 - sysdeps/mach/hurd/i386/libc.abilist | 1 + sysdeps/mach/hurd/i386/libpthread.abilist | 1 - sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 - 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index c5d1c473..6058ffe9 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -26,7 +26,6 @@ LCLHDRS := libpthread-routines := \ pt-attr \ - pt-attr-destroy \ pt-attr-getguardsize \ pt-attr-getscope \ pt-attr-getstack \ @@ -211,6 +210,7 @@ routines := \ pt-pthread_self \ pt-self pt-equal \ pt-setschedparam \ + pt-attr-destroy \ # routines shared-only-routines = forward diff --git a/htl/Versions b/htl/Versions index 949c1867..34b1f87a 100644 --- a/htl/Versions +++ b/htl/Versions @@ -13,6 +13,7 @@ libc { pthread_equal; pthread_getschedparam; pthread_setschedparam; + pthread_attr_destroy; } GLIBC_2.21 { @@ -77,7 +78,6 @@ libpthread { pthread_atfork; - pthread_attr_destroy; pthread_attr_getguardsize; pthread_attr_getscope; pthread_attr_getstack; pthread_attr_getstackaddr; pthread_attr_getstacksize; pthread_attr_init; diff --git a/htl/forward.c b/htl/forward.c index ee89e50b..579e8cba 100644 --- a/htl/forward.c +++ b/htl/forward.c @@ -53,8 +53,6 @@ name decl \ #define FORWARD(name, decl, params, defretval) \ FORWARD2 (name, int, decl, params, return defretval) -FORWARD (pthread_attr_destroy, (pthread_attr_t *attr), (attr), 0) - FORWARD (pthread_attr_init, (pthread_attr_t *attr), (attr), 0) FORWARD (pthread_attr_setschedparam, diff --git a/htl/pt-initialize.c b/htl/pt-initialize.c index 47b992fe..0368bfa4 100644 --- a/htl/pt-initialize.c +++ b/htl/pt-initialize.c @@ -27,7 +27,6 @@ #if IS_IN (libpthread) static const struct pthread_functions pthread_functions = { - .ptr_pthread_attr_destroy = __pthread_attr_destroy, .ptr_pthread_attr_init = __pthread_attr_init, .ptr_pthread_attr_setschedparam = __pthread_attr_setschedparam, .ptr_pthread_attr_getscope = __pthread_attr_getscope, diff --git a/sysdeps/htl/pt-attr-destroy.c b/sysdeps/htl/pt-attr-destroy.c index 8b6814e4..3ad76fa3 100644 --- a/sysdeps/htl/pt-attr-destroy.c +++ b/sysdeps/htl/pt-attr-destroy.c @@ -17,6 +17,7 @@ . */ #include +#include #include int @@ -24,4 +25,8 @@ __pthread_attr_destroy (pthread_attr_t *attr) { return 0; } -weak_alias (__pthread_attr_destroy, pthread_attr_destroy); +versioned_symbol (libc, __pthread_attr_destroy, pthread_attr_destroy, GLIBC_2_21); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21) +compat_symbol (libc, __pthread_attr_destroy, pthread_attr_destroy, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthread-functions.h b/sysdeps/htl/pthread-functions.h index f7b6fb79..9cea6d05 100644 --- a/sysdeps/htl/pthread-functions.h +++ b/sysdeps/htl/pthread-functions.h @@ -21,7 +21,6 @@ #include -int __pthread_attr_destroy (pthread_attr_t *); int __pthread_attr_init (pthread_attr_t *); int __pthread_attr_setschedparam (pthread_attr_t *, const struct sched_param *); diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index dc2c6b50..83c32183 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -29,6 +29,7 @@ GLIBC_2.11 mkostemps64 F GLIBC_2.11 mkstemps F GLIBC_2.11 mkstemps64 F GLIBC_2.12 __pthread_self F +GLIBC_2.12 pthread_attr_destroy F GLIBC_2.12 pthread_attr_getdetachstate F GLIBC_2.12 pthread_attr_getinheritsched F GLIBC_2.12 pthread_attr_getschedparam F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 3ea7cb41..f8f5daf5 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_destroy F GLIBC_2.12 pthread_attr_getguardsize F GLIBC_2.12 pthread_attr_getscope F GLIBC_2.12 pthread_attr_getstack F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index 69999df5..54b3e34b 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_destroy F GLIBC_2.38 pthread_attr_getguardsize F GLIBC_2.38 pthread_attr_getscope F GLIBC_2.38 pthread_attr_getstack F From patchwork Mon Nov 18 11:21:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 101422 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 279C9385B538 for ; Mon, 18 Nov 2024 11:23:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 279C9385B538 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=disroot.org header.i=@disroot.org header.a=rsa-sha256 header.s=mail header.b=YY8ZqKJZ X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) by sourceware.org (Postfix) with ESMTPS id 33FC1385841C for ; Mon, 18 Nov 2024 11:22:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 33FC1385841C Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=disroot.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 33FC1385841C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928936; cv=none; b=v6jkGOg35udnyKlJAweYNVPdPc+BSE7Sy3x2y7uNX3IJZwUXZYiw1c4GzuiomKRAztbQZjw5MonI67TohhHFaAHAuAOITS8JQguAwIJjrpzoYasQB6+54/NcUhbuEeiebqbbqWxEK9UaO5KWxkwy6FAzGZTivQ2WaFGSwWOCTjw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928936; c=relaxed/simple; bh=5CTge55mPCqV95DfoknrNwOhLFiwIUjNiqAIcJ94V9k=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=mCEdrYDC7dnmhoXKbFjuShOMd1dTMf4QE2JLkOJF92YYzlRQXsmTE6ZsiK6iO8TwYVNbNsQpuME2clvlGHGwKaLUb9TUKVNOTOa2TxqfklHU/UlO7Xxr3lOJ5Noe1kKXaLt3wg3wM36kpT8RiFuZ3HlWTG/Ix3qFiPJu5DeTCYg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 33FC1385841C Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 23742251D0; Mon, 18 Nov 2024 12:22:14 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id lyNVBacTBuBu; Mon, 18 Nov 2024 12:22:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1731928933; bh=5CTge55mPCqV95DfoknrNwOhLFiwIUjNiqAIcJ94V9k=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=YY8ZqKJZlCkKiTl6gWp2sqQBojUoEb47m2GUnSBQih5XIS1gNGF95GxIrna43KJIj VyQUmh1qwMJZzPD9uF98rPRUqaUWwiHBpfM9IT1iegjAxsJ5TXPrxBFqLtzVbfJwcL go0AhMgqMWa7smY0nVNM5VqbtcSb2ctEDFTZ7e9CAZckNeGa+V+EjS9bjX62NPvsdz 3zuHlZWg33vRGkLeK4ffeW5iIkZPbN6jQGZRmWE7J0skc+xDfxRCiKhZwB5d5ij9eV cwYASeYUeCof83y7M9UqTTSXeyOAi2v/kKQSBEOWO4MC3sT0HHGI5zOINYRhHuuKWg 8RwxCMGZJpcGQ== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 02/13] htl: move __pthread_default_attr into libc Date: Mon, 18 Nov 2024 13:21:34 +0200 Message-Id: <20241118112145.50259-3-gfleury@disroot.org> In-Reply-To: <20241118112145.50259-1-gfleury@disroot.org> References: <20241118112145.50259-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, 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 Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 1 + htl/pt-internal.h | 1 + sysdeps/htl/pt-attr.c | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/htl/Makefile b/htl/Makefile index 6058ffe9..2d7f3d76 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -25,7 +25,6 @@ SYSDEPS := lockfile LCLHDRS := libpthread-routines := \ - pt-attr \ pt-attr-getguardsize \ pt-attr-getscope \ pt-attr-getstack \ @@ -211,6 +210,7 @@ routines := \ pt-self pt-equal \ pt-setschedparam \ pt-attr-destroy \ + pt-attr \ # routines shared-only-routines = forward diff --git a/htl/Versions b/htl/Versions index 34b1f87a..05ef8054 100644 --- a/htl/Versions +++ b/htl/Versions @@ -50,6 +50,7 @@ libc { __pthread_total; ___pthread_self; __pthread_init_thread; + __pthread_default_attr; } } diff --git a/htl/pt-internal.h b/htl/pt-internal.h index 85a7d905..bdc8b83d 100644 --- a/htl/pt-internal.h +++ b/htl/pt-internal.h @@ -319,6 +319,7 @@ extern int __pthread_mutex_checklocked (pthread_mutex_t *mtx); /* Default thread attributes. */ extern struct __pthread_attr __pthread_default_attr; +libc_hidden_proto (__pthread_default_attr) /* Default barrier attributes. */ extern const struct __pthread_barrierattr __pthread_default_barrierattr; diff --git a/sysdeps/htl/pt-attr.c b/sysdeps/htl/pt-attr.c index ddc2c808..4f0ba838 100644 --- a/sysdeps/htl/pt-attr.c +++ b/sysdeps/htl/pt-attr.c @@ -37,3 +37,4 @@ struct __pthread_attr __pthread_default_attr = { __contentionscope: PTHREAD_SCOPE_SYSTEM, __schedpolicy: SCHED_OTHER }; +libc_hidden_data_def (__pthread_default_attr) From patchwork Mon Nov 18 11:21:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 101428 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 7A702385B525 for ; Mon, 18 Nov 2024 11:25:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A702385B525 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=disroot.org header.i=@disroot.org header.a=rsa-sha256 header.s=mail header.b=HlISZ8pl X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) by sourceware.org (Postfix) with ESMTPS id EE6B2385B51A for ; Mon, 18 Nov 2024 11:22:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EE6B2385B51A Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=disroot.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EE6B2385B51A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928941; cv=none; b=s/gAKrnaxaa8/nTwxXBw9oj/IemJ8TKNaK7yfCa+b7zaLERJxtk2DE4BzZ8L+yeyFLL8vYXM0+1g1Mvt9EJ13KbBePAkT5PwEqK6HTt+378NRrVWoKf9S0yFlkIbffzZxiDW7nu/VHg/bkh1pZHA9+LjsWxKGkeD7VBxcmcj/ig= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928941; c=relaxed/simple; bh=kkRUHZSICnlNN1QMNtsBfGvC0YxDzTaQpBSMjIoLiNs=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=ukkGjpC4fHVboo/SiJ5E9A0QDXR0cSGZP6KTqb4XGBzksyRaGRN7Z07uE7KJfo1ayzCtzTrbt3Mre/Hqt0I7c2myb9hOsWseefg/EyFDIa6WWSeFreK5DG1qVVsLnSKW60XKBd4Tue3gaEFIC+e4OL14f/iXmxgwDJmDNePn2Zw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 1E73525367; Mon, 18 Nov 2024 12:22:19 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id rQzjsqOoiwdl; Mon, 18 Nov 2024 12:22:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1731928934; bh=kkRUHZSICnlNN1QMNtsBfGvC0YxDzTaQpBSMjIoLiNs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=HlISZ8plomY2XX+g2qJiHQaNQv/TeIMKemasoEpUogAQAB6zEOcBaCDwZnVsggi00 ka5m12QtCR36kXZlIP5eojnhcpd8TdiYnv8+8mTwmZDqZBgQiZUmbem4jVaMgVrksV bRY0oB2tX7rslgcpMded3+izX3oNdaG/iIrjSha31uJDuwjGYvrZZJj1AAtiowJloT 2UFig9SWjQSg3FkJZYpUfDeUWfIVOJwPkVln2dWHbDiN7XhgMoHc/s5YMz0hGOd9YU xnGGUSqEYUGP1HzduYbuz9+EIU8bIdT8MTogEyxl6aUZSyl9cruKJjkZ5ZudTqAjuo VB+rmjrKGeZWQ== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 03/13] htl move pthread_attr_getguardsize into libc. Date: Mon, 18 Nov 2024 13:21:35 +0200 Message-Id: <20241118112145.50259-4-gfleury@disroot.org> In-Reply-To: <20241118112145.50259-1-gfleury@disroot.org> References: <20241118112145.50259-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, 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 Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 7 ++++++- sysdeps/htl/pt-attr-getguardsize.c | 8 +++++++- 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 - 7 files changed, 18 insertions(+), 5 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 2d7f3d76..a5028d1b 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -25,7 +25,6 @@ SYSDEPS := lockfile LCLHDRS := libpthread-routines := \ - pt-attr-getguardsize \ pt-attr-getscope \ pt-attr-getstack \ pt-attr-getstackaddr \ @@ -211,6 +210,7 @@ routines := \ pt-setschedparam \ pt-attr-destroy \ pt-attr \ + pt-attr-getguardsize \ # routines shared-only-routines = forward diff --git a/htl/Versions b/htl/Versions index 05ef8054..336d81bd 100644 --- a/htl/Versions +++ b/htl/Versions @@ -14,6 +14,7 @@ libc { pthread_getschedparam; pthread_setschedparam; pthread_attr_destroy; + pthread_attr_getguardsize; } GLIBC_2.21 { @@ -43,6 +44,11 @@ libc { thrd_current; thrd_equal; thrd_sleep; thrd_yield; } + GLIBC_2.41 { + pthread_attr_getguardsize; + } + + GLIBC_PRIVATE { __libc_alloca_cutoff; __libc_pthread_init; @@ -79,7 +85,6 @@ libpthread { pthread_atfork; - pthread_attr_getguardsize; pthread_attr_getscope; pthread_attr_getstack; pthread_attr_getstackaddr; pthread_attr_getstacksize; pthread_attr_init; pthread_attr_setguardsize; diff --git a/sysdeps/htl/pt-attr-getguardsize.c b/sysdeps/htl/pt-attr-getguardsize.c index e9e56d0d..986e2124 100644 --- a/sysdeps/htl/pt-attr-getguardsize.c +++ b/sysdeps/htl/pt-attr-getguardsize.c @@ -17,11 +17,17 @@ . */ #include +#include #include int -pthread_attr_getguardsize (const pthread_attr_t *attr, size_t * guardsize) +__pthread_attr_getguardsize (const pthread_attr_t *attr, size_t * guardsize) { *guardsize = attr->__guardsize; return 0; } +versioned_symbol (libpthread, __pthread_attr_getguardsize, pthread_attr_getguardsize, GLIBC_2_41); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41) +compat_symbol (libpthread, __pthread_attr_getguardsize, pthread_attr_getguardsize, GLIBC_2_12); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 83c32183..122dfc63 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -31,6 +31,7 @@ GLIBC_2.11 mkstemps64 F GLIBC_2.12 __pthread_self F GLIBC_2.12 pthread_attr_destroy F GLIBC_2.12 pthread_attr_getdetachstate F +GLIBC_2.12 pthread_attr_getguardsize F GLIBC_2.12 pthread_attr_getinheritsched F GLIBC_2.12 pthread_attr_getschedparam F GLIBC_2.12 pthread_attr_getschedpolicy F @@ -2086,6 +2087,7 @@ GLIBC_2.28 statx F GLIBC_2.29 _hurd_port_move F GLIBC_2.29 posix_spawn_file_actions_addchdir_np F GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F +GLIBC_2.41 pthread_attr_getguardsize F GLIBC_2.3 __ctype_b_loc F GLIBC_2.3 __ctype_tolower_loc F GLIBC_2.3 __ctype_toupper_loc F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index f8f5daf5..3451543d 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_getguardsize F GLIBC_2.12 pthread_attr_getscope F GLIBC_2.12 pthread_attr_getstack F GLIBC_2.12 pthread_attr_getstackaddr F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 7c685645..ca72304d 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1513,6 +1513,7 @@ GLIBC_2.38 psiginfo F GLIBC_2.38 psignal F GLIBC_2.38 pthread_attr_destroy F GLIBC_2.38 pthread_attr_getdetachstate F +GLIBC_2.38 pthread_attr_getguardsize F GLIBC_2.38 pthread_attr_getinheritsched F GLIBC_2.38 pthread_attr_getschedparam F GLIBC_2.38 pthread_attr_getschedpolicy F @@ -2184,6 +2185,7 @@ GLIBC_2.39 stdc_trailing_zeros_ui F 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 HURD_CTHREADS_0.3 __cthread_getspecific F HURD_CTHREADS_0.3 __cthread_keycreate F HURD_CTHREADS_0.3 __cthread_setspecific F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index 54b3e34b..556cc6e2 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_getguardsize F GLIBC_2.38 pthread_attr_getscope F GLIBC_2.38 pthread_attr_getstack F GLIBC_2.38 pthread_attr_getstackaddr F From patchwork Mon Nov 18 11:21:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 101423 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 A781B385B837 for ; Mon, 18 Nov 2024 11:23:24 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) by sourceware.org (Postfix) with ESMTPS id 0BE6C385B520 for ; Mon, 18 Nov 2024 11:22:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0BE6C385B520 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=disroot.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0BE6C385B520 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928942; cv=none; b=KIqgS9rstEFL6yA04osRHTWeigywOmFyXW8EdCe+jLrCSzyDFaaT3MI63FkTeYs/MnRFpbA9kfPZ3XM40GBGpxpt0Gg4CtQt2sfezxYAwPxRUPOaRFrIYJvtlhRzfRIBcCVFvWWP0b7mf1FwWqK3b9md3mdHfwPqOxs9eh37NIM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928942; c=relaxed/simple; bh=zSmRNi3hvdIG7Cuiv5rijrcaa462Yt3WIVqCGKvz7fI=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=EhZq2nIcQdB3E/RhX/ZMtnTgLjDUND9gwgqmXJ4kVOHG+QZsI0TbcIk17Q3HNvoDnbJyM5gUsbkaH9XorfUEgHdmr8EhPls202eJJeqNGxCITUTfbFRhrXzyZSss/kGNYQkLTADC3z8a0aiHTDzC6PRaGJiHbh5+ao8GJmCyqgI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 4D79F252E8; Mon, 18 Nov 2024 12:22:20 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id FNt7XVAyC-j9; Mon, 18 Nov 2024 12:22:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1731928936; bh=zSmRNi3hvdIG7Cuiv5rijrcaa462Yt3WIVqCGKvz7fI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=hiOA6Oyhau1qNwvNxa2WVyAoyPWzwWuQouKdRz6ex680KjHxbGcMx1b9tfRoU4W1s MOmZQHxlU6VuIT7L4ht8WK9hXCgHKFLG9Uw9z7SK2NW1zWjiWnE+1FZKrJwPbVEH5j jMdEEvqEMvJHj8nyBF8PiihhpKZMQmfoVvnlz0MTJdDBpvsgocHiGMZ32oMmgKjcrg DozEnc98Yw46CE1vKemdR0Me+U1xFkEGyCd8BV48Kh+/IzoDbjPfYPF0RUOHK5SobX Db7gpEmk12lDj/2Bkz4kklxHVB1jv5R4KMHOSBXRynGDoMHSjqRMx7SgfFnJLUKKLw rPpqgLtp1nziQ== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 04/13] htl move pthread_attr_getscope into libc. Date: Mon, 18 Nov 2024 13:21:36 +0200 Message-Id: <20241118112145.50259-5-gfleury@disroot.org> In-Reply-To: <20241118112145.50259-1-gfleury@disroot.org> References: <20241118112145.50259-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, 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 Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 3 ++- htl/forward.c | 2 -- htl/pt-initialize.c | 1 - sysdeps/htl/pt-attr-getscope.c | 6 +++++- sysdeps/htl/pthread-functions.h | 2 -- sysdeps/mach/hurd/i386/libc.abilist | 1 + sysdeps/mach/hurd/i386/libpthread.abilist | 1 - sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 - 9 files changed, 9 insertions(+), 10 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index a5028d1b..8e5eeb50 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -25,7 +25,6 @@ SYSDEPS := lockfile LCLHDRS := libpthread-routines := \ - pt-attr-getscope \ pt-attr-getstack \ pt-attr-getstackaddr \ pt-attr-getstacksize \ @@ -211,6 +210,7 @@ routines := \ pt-attr-destroy \ pt-attr \ pt-attr-getguardsize \ + pt-attr-getscope \ # routines shared-only-routines = forward diff --git a/htl/Versions b/htl/Versions index 336d81bd..4372c2de 100644 --- a/htl/Versions +++ b/htl/Versions @@ -15,6 +15,7 @@ libc { pthread_setschedparam; pthread_attr_destroy; pthread_attr_getguardsize; + pthread_attr_getscope; } GLIBC_2.21 { @@ -85,7 +86,7 @@ libpthread { pthread_atfork; - pthread_attr_getscope; pthread_attr_getstack; pthread_attr_getstackaddr; + pthread_attr_getstack; pthread_attr_getstackaddr; pthread_attr_getstacksize; pthread_attr_init; pthread_attr_setguardsize; pthread_attr_setschedparam; diff --git a/htl/forward.c b/htl/forward.c index 579e8cba..6644d67d 100644 --- a/htl/forward.c +++ b/htl/forward.c @@ -59,8 +59,6 @@ FORWARD (pthread_attr_setschedparam, (pthread_attr_t *attr, const struct sched_param *param), (attr, param), 0) -FORWARD (pthread_attr_getscope, - (const pthread_attr_t *attr, int *scope), (attr, scope), 0) FORWARD (pthread_attr_setscope, (pthread_attr_t *attr, int scope), (attr, scope), 0) diff --git a/htl/pt-initialize.c b/htl/pt-initialize.c index 0368bfa4..0d20f39e 100644 --- a/htl/pt-initialize.c +++ b/htl/pt-initialize.c @@ -29,7 +29,6 @@ static const struct pthread_functions pthread_functions = { .ptr_pthread_attr_init = __pthread_attr_init, .ptr_pthread_attr_setschedparam = __pthread_attr_setschedparam, - .ptr_pthread_attr_getscope = __pthread_attr_getscope, .ptr_pthread_attr_setscope = __pthread_attr_setscope, .ptr_pthread_condattr_destroy = __pthread_condattr_destroy, .ptr_pthread_condattr_init = __pthread_condattr_init, diff --git a/sysdeps/htl/pt-attr-getscope.c b/sysdeps/htl/pt-attr-getscope.c index a1ef854c..fe1f663b 100644 --- a/sysdeps/htl/pt-attr-getscope.c +++ b/sysdeps/htl/pt-attr-getscope.c @@ -17,6 +17,7 @@ . */ #include +#include #include int @@ -25,5 +26,8 @@ __pthread_attr_getscope (const pthread_attr_t *attr, int *contentionscope) *contentionscope = attr->__contentionscope; return 0; } +versioned_symbol (libc, __pthread_attr_getscope, pthread_attr_getscope, GLIBC_2_21); -weak_alias (__pthread_attr_getscope, pthread_attr_getscope); +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21) +compat_symbol (libc, __pthread_attr_getscope, pthread_attr_getscope, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthread-functions.h b/sysdeps/htl/pthread-functions.h index 9cea6d05..c95735ec 100644 --- a/sysdeps/htl/pthread-functions.h +++ b/sysdeps/htl/pthread-functions.h @@ -24,7 +24,6 @@ int __pthread_attr_init (pthread_attr_t *); int __pthread_attr_setschedparam (pthread_attr_t *, const struct sched_param *); -int __pthread_attr_getscope (const pthread_attr_t *, int *); int __pthread_attr_setscope (pthread_attr_t *, int); int __pthread_condattr_destroy (pthread_condattr_t *); int __pthread_condattr_init (pthread_condattr_t *); @@ -67,7 +66,6 @@ struct pthread_functions int (*ptr_pthread_attr_init) (pthread_attr_t *); int (*ptr_pthread_attr_setschedparam) (pthread_attr_t *, const struct sched_param *); - int (*ptr_pthread_attr_getscope) (const pthread_attr_t *, int *); int (*ptr_pthread_attr_setscope) (pthread_attr_t *, int); int (*ptr_pthread_condattr_destroy) (pthread_condattr_t *); int (*ptr_pthread_condattr_init) (pthread_condattr_t *); diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 122dfc63..47a4b3d9 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -35,6 +35,7 @@ GLIBC_2.12 pthread_attr_getguardsize F 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_setdetachstate F GLIBC_2.12 pthread_attr_setinheritsched F GLIBC_2.12 pthread_attr_setschedpolicy F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 3451543d..03fcee4c 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_getscope F GLIBC_2.12 pthread_attr_getstack F GLIBC_2.12 pthread_attr_getstackaddr F GLIBC_2.12 pthread_attr_getstacksize F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index 556cc6e2..1d189726 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_getscope F GLIBC_2.38 pthread_attr_getstack F GLIBC_2.38 pthread_attr_getstackaddr F GLIBC_2.38 pthread_attr_getstacksize F From patchwork Mon Nov 18 11:21:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 101426 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 5AA59385B539 for ; Mon, 18 Nov 2024 11:24:10 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) by sourceware.org (Postfix) with ESMTPS id F2522385B514 for ; Mon, 18 Nov 2024 11:22:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F2522385B514 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=disroot.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F2522385B514 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928940; cv=none; b=yCVk6iXNAKLrXkv4hptqYXzTy6pqkzITZsXSJheBUoshmhCEBzT0SopMP3hqgnLA27jCJpe2Od26TTwwRntWFEmr3dU+HUtcG+wa0fDjxzF0SPPLEvU6RdVVGjlZL/R/8AXr4TPAB5iLldgqA2V+F1HnKh0jWom8sQgJfwtRBb0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928940; c=relaxed/simple; bh=eRrHC/H1lbeCNd7PfFbV3aQFX+z6cxz2K2y6vGFlYM4=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=CyoBXrg9PtQLCDi7h37ww/785xNFlrhCVkleRbULdAXMqR4T+7+Tk1ICu1zQ69y2bi5JQnk5ycMJTrGBWMLw8+w5yPUOZ6TK9bWc37nu8l1ecsaB9kilya01A0Bht1WqshjtWfhU9ZhQg95tIrgsw8Ms7YRtby6iy9Tarp+LHiA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 86BEF25338; Mon, 18 Nov 2024 12:22:18 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id VdE46Tr68M3S; Mon, 18 Nov 2024 12:22:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1731928937; bh=eRrHC/H1lbeCNd7PfFbV3aQFX+z6cxz2K2y6vGFlYM4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=AN4dQnfyZM+AI5HpSDyA+0jlRDkOxuGOlpcHYJq9CxWnSYpzIfONghti70XAh6pPE VdAdf7r3kt+btAnU+GhxgbfqtKisKd5lcUtqk1dbdq62+PAwoKmSgRa2PQgIoiNULm JtpqCnrtGZT/GKcqdjSM1WXmrU/n0XsnmOem3fj64SkJ2TeiBV8Q7yF3EISwVKpOZ2 NdXO8K1F7g0thNCzmyMGlkkZ36dJQ38yWlg6pueX3vwUpuj4IssZrVPcCO5e1U/Zo5 AqsfhPPuQtEsAd7Itk2ooxaXiC4OhLXF7pgJlilroFwMwBwpcQqKFjrxFopZSH4V1B l61O4tn9gAzcA== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 05/13] htl move pthread_attr_getstacksize into libc. Date: Mon, 18 Nov 2024 13:21:37 +0200 Message-Id: <20241118112145.50259-6-gfleury@disroot.org> In-Reply-To: <20241118112145.50259-1-gfleury@disroot.org> References: <20241118112145.50259-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, 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 Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 5 ++++- sysdeps/htl/pt-attr-getstacksize.c | 7 ++++++- 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 - 7 files changed, 15 insertions(+), 5 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 8e5eeb50..ebca4325 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -27,7 +27,6 @@ LCLHDRS := libpthread-routines := \ pt-attr-getstack \ pt-attr-getstackaddr \ - pt-attr-getstacksize \ pt-attr-init \ pt-attr-setguardsize \ pt-attr-setschedparam \ @@ -211,6 +210,7 @@ routines := \ pt-attr \ pt-attr-getguardsize \ pt-attr-getscope \ + pt-attr-getstacksize \ # routines shared-only-routines = forward diff --git a/htl/Versions b/htl/Versions index 4372c2de..deca0d41 100644 --- a/htl/Versions +++ b/htl/Versions @@ -16,6 +16,7 @@ libc { pthread_attr_destroy; pthread_attr_getguardsize; pthread_attr_getscope; + pthread_attr_getstacksize; } GLIBC_2.21 { @@ -47,6 +48,7 @@ libc { GLIBC_2.41 { pthread_attr_getguardsize; + pthread_attr_getstacksize; } @@ -58,6 +60,7 @@ libc { ___pthread_self; __pthread_init_thread; __pthread_default_attr; + __pthread_attr_getstacksize; } } @@ -87,7 +90,7 @@ libpthread { pthread_atfork; pthread_attr_getstack; pthread_attr_getstackaddr; - pthread_attr_getstacksize; pthread_attr_init; + pthread_attr_init; pthread_attr_setguardsize; pthread_attr_setschedparam; pthread_attr_setscope; pthread_attr_setstack; pthread_attr_setstackaddr; diff --git a/sysdeps/htl/pt-attr-getstacksize.c b/sysdeps/htl/pt-attr-getstacksize.c index 1f05fe0d..cac0600b 100644 --- a/sysdeps/htl/pt-attr-getstacksize.c +++ b/sysdeps/htl/pt-attr-getstacksize.c @@ -17,6 +17,7 @@ . */ #include +#include #include int @@ -25,4 +26,8 @@ __pthread_attr_getstacksize (const pthread_attr_t *attr, size_t * stacksize) *stacksize = attr->__stacksize; return 0; } -weak_alias (__pthread_attr_getstacksize, pthread_attr_getstacksize) +versioned_symbol (libc, __pthread_attr_getstacksize, pthread_attr_getstacksize, GLIBC_2_41); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41) +compat_symbol (libpthread, __pthread_attr_getstacksize,pthread_attr_getstacksize, GLIBC_2_12); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 47a4b3d9..34fa8dce 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_getstacksize F GLIBC_2.12 pthread_attr_setdetachstate F GLIBC_2.12 pthread_attr_setinheritsched F GLIBC_2.12 pthread_attr_setschedpolicy F @@ -2089,6 +2090,7 @@ GLIBC_2.29 _hurd_port_move F GLIBC_2.29 posix_spawn_file_actions_addchdir_np F GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F GLIBC_2.41 pthread_attr_getguardsize F +GLIBC_2.41 pthread_attr_getstacksize F GLIBC_2.3 __ctype_b_loc F GLIBC_2.3 __ctype_tolower_loc F GLIBC_2.3 __ctype_toupper_loc F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 03fcee4c..8d700ff4 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -24,7 +24,6 @@ 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_getstacksize 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 ca72304d..c0bf7367 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_getstacksize F GLIBC_2.38 pthread_attr_init F GLIBC_2.38 pthread_attr_setdetachstate F GLIBC_2.38 pthread_attr_setinheritsched F @@ -2186,6 +2187,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_getstacksize F HURD_CTHREADS_0.3 __cthread_getspecific F HURD_CTHREADS_0.3 __cthread_keycreate F HURD_CTHREADS_0.3 __cthread_setspecific F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index 1d189726..c0bfe11d 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -41,7 +41,6 @@ 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_getstacksize F GLIBC_2.38 pthread_attr_init F GLIBC_2.38 pthread_attr_setguardsize F GLIBC_2.38 pthread_attr_setschedparam F From patchwork Mon Nov 18 11:21:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 101424 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 6C4C1385B83F for ; Mon, 18 Nov 2024 11:23:39 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) by sourceware.org (Postfix) with ESMTPS id 098A5385B528 for ; Mon, 18 Nov 2024 11:22:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 098A5385B528 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=disroot.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 098A5385B528 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928944; cv=none; b=PVFe6xIxFFPGCfn6WSEsjgWBj2xUE/KVtahopBlwnkE+nRC2z+BlRsMQnN/9QyUdeHtjRGnwJJcmgY74gYKD9Vj76IBjrAG+JPSUFDEezCQJHCSmLuqcaKgcy3NHd9iMW+ZPD7SOIVe8hd1sjkqWxHSndhv2IoSqgtpm5WC4OxU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928944; c=relaxed/simple; bh=oQP58LGvk5WyR37NJ6HWsF4qvxpExZ6VNi7qSpTmNOw=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=r9RFp4ucyQr24+6kW1oQRHUAOINtUAAJcQSSSJsHhrhCxblehgsHyYspG/Qq+ezHTnSi8pdqy7LsEXa0BLM+ownzXo7AjaGImBAB1dn2qUTpl/85Eru9bg/33PfmcyDjAypD6qgmMWZcuO9Uveeq+RKrvEgnwnip3AsJTT3mjTk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id CA2DE25351; Mon, 18 Nov 2024 12:22:21 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 8025_4bYiP_o; Mon, 18 Nov 2024 12:22:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1731928938; bh=oQP58LGvk5WyR37NJ6HWsF4qvxpExZ6VNi7qSpTmNOw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=RTm6BW17lk+8CkPbVYvYnWG0AbCD5vmuSj9sn3FpjLNMMEOn/uPwE/0Lt4m8jzGI5 /QT2iQ1zogsd1S3GSM2nQuh03fH5YV/BbyKdnXJb4448AhCHFPA05Hg14wxT/hP/Os NZfJdFVfdnaAR78OeYdcxGdsnawFve7jIxXgeT49tNZ35TNEYIOWDb3vxRqkp4xUSA 35zMLPVZ0bZWx0rYJUN/O3ZKheo1+kRD1iOW3ER3aDfzKrdyqSg646kdPaFKQgRjGL gSLccCmGcog8Bb6I79PNxLvTDndT4RTY9/ZW6E4NSRwXEVlGVmwE1X7pV1KhGmHDfB GJR4B0uiaTDOA== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 06/13] htl: move pthread_attr_getstackaddr into libc. Date: Mon, 18 Nov 2024 13:21:38 +0200 Message-Id: <20241118112145.50259-7-gfleury@disroot.org> In-Reply-To: <20241118112145.50259-1-gfleury@disroot.org> References: <20241118112145.50259-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, 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 Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 5 ++++- sysdeps/htl/pt-attr-getstackaddr.c | 7 ++++++- 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 - 7 files changed, 15 insertions(+), 5 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index ebca4325..f6986754 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 \ @@ -211,6 +210,7 @@ routines := \ pt-attr-getguardsize \ pt-attr-getscope \ pt-attr-getstacksize \ + pt-attr-getstackaddr \ # routines shared-only-routines = forward diff --git a/htl/Versions b/htl/Versions index deca0d41..f72569c6 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 2782ee3b..6a17074c 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,8 @@ __pthread_attr_getstackaddr (const pthread_attr_t *attr, void **stackaddr) *stackaddr = attr->__stackaddr; return 0; } -weak_alias (__pthread_attr_getstackaddr, 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/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 34fa8dce..65504588 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 @@ -2090,6 +2091,7 @@ GLIBC_2.29 _hurd_port_move F GLIBC_2.29 posix_spawn_file_actions_addchdir_np F GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F GLIBC_2.41 pthread_attr_getguardsize F +GLIBC_2.41 pthread_attr_getstackaddr F GLIBC_2.41 pthread_attr_getstacksize F GLIBC_2.3 __ctype_b_loc F GLIBC_2.3 __ctype_tolower_loc F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 8d700ff4..fed16264 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 c0bf7367..242c40e8 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 c0bfe11d..a1f74eb9 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 From patchwork Mon Nov 18 11:21:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 101429 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 B83B1385B51A for ; Mon, 18 Nov 2024 11:25:40 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) by sourceware.org (Postfix) with ESMTPS id 0ACC8385B527 for ; Mon, 18 Nov 2024 11:22:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0ACC8385B527 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=disroot.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0ACC8385B527 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928943; cv=none; b=EUMrEuJXQlONGq7NEayM6VqR8r8eqCViLcmzpwI2YMaosx8FvHZNVe5rLXLCauLKi04iRqsexXG42g6Nx+/WO7wOHc1/esMf2cdSvyVmr6C3a6hjQBD8xCn39kxU7bfAlYisKQ3wUvxV4SLonkCJfuXIYSYw3dkw2WabjLakMPA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928943; c=relaxed/simple; bh=Er0JYGLcuDHpgGZR+enZh+PeqhD7PHtH7uQtpR/j01I=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=r6Iq8dmkbsGUkVhlAwbw8WJTWB7suf8VNRrFw434+0jOnb0Fas10haLbwR2LQcebZFJHXP0QM+dGetQPmTZV66+XuuqJJj4GM7F4iN2YH8meqbF0Qq9oyAfv04C/19Ge2a/6QeJNiTjba4Di4HgAabdYCQaQuw2zTIVC4mFS04E= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0ACC8385B527 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=disroot.org header.i=@disroot.org header.a=rsa-sha256 header.s=mail header.b=SH/SOeeN Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 0C6D324FB5; Mon, 18 Nov 2024 12:22:21 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 73HyY8tapuUQ; Mon, 18 Nov 2024 12:22:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1731928939; bh=Er0JYGLcuDHpgGZR+enZh+PeqhD7PHtH7uQtpR/j01I=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=SH/SOeeNTEAzHfvCEPf+cV5k+1dzv6UVftPJG89VA6lY5IwPC2pG23SV1zfCmUnz9 SSicDyLV1eAoX8K+UhuTO8H7Y9SM9nR/QEdeVwryTTG6g+Ay/YM/w4v2t0u28TT8ZK fVmw52HKbIBo2V3h/QsXSx944XlClsjYIsADQS9ReppzHVUkB2YhziNzALSRAGg6Vj xYbsvCEIPF6YjPUw6QvJzV96mHJ4Nd2qwoLtabZGs5oebKLVXEYt93qn/HGinT6TlD n2+3Typ3g+Dfl8RdeC5upL4wqG7z/h3XU5f49Ff1Oa9C/Z6bBAa9H2i0qIp4y5jzFB dmj5yuod7NvPA== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 07/13] htl: move pthread_attr_getstack into libc. Date: Mon, 18 Nov 2024 13:21:39 +0200 Message-Id: <20241118112145.50259-8-gfleury@disroot.org> In-Reply-To: <20241118112145.50259-1-gfleury@disroot.org> References: <20241118112145.50259-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, 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 Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 5 +++-- sysdeps/htl/pt-attr-getstack.c | 7 ++++++- 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 - 7 files changed, 14 insertions(+), 6 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index f6986754..86bf4bc4 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 \ @@ -211,6 +210,7 @@ routines := \ pt-attr-getscope \ pt-attr-getstacksize \ pt-attr-getstackaddr \ + pt-attr-getstack \ # routines shared-only-routines = forward diff --git a/htl/Versions b/htl/Versions index f72569c6..05b7765e 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 42ab5fdd..33902dea 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,8 @@ __pthread_attr_getstack (const pthread_attr_t *attr, __pthread_attr_getstacksize (attr, stacksize); return 0; } -weak_alias (__pthread_attr_getstack, 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/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 65504588..6330e4b1 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 @@ -2091,6 +2092,7 @@ GLIBC_2.29 _hurd_port_move F GLIBC_2.29 posix_spawn_file_actions_addchdir_np F GLIBC_2.29 posix_spawn_file_actions_addfchdir_np 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.3 __ctype_b_loc F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index fed16264..2f50e329 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 242c40e8..3e829c3b 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 a1f74eb9..e3c04abe 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 From patchwork Mon Nov 18 11:21:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 101434 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 35C63385B532 for ; Mon, 18 Nov 2024 11:30:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 35C63385B532 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=disroot.org header.i=@disroot.org header.a=rsa-sha256 header.s=mail header.b=DNYkad01 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) by sourceware.org (Postfix) with ESMTPS id 0C1BE385B52F for ; Mon, 18 Nov 2024 11:22:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0C1BE385B52F Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=disroot.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0C1BE385B52F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928964; cv=none; b=Gaj70fMrmpmb/0jqsSdiJnY8EWnfqdZMEQuURFNhix28U8s0IVx2nHGrvFzNb4yDEheDNgw+xtj5WhQ53D0S6SiWD6w6n6ax0tgv29W0lXp5MkhvLx4F/s0jI6D3g82ok2TtRU6ouZiAxEI3LEw/JY+I2QeDA/GZue9eblkbgCQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928964; c=relaxed/simple; bh=BNV/5tvbkj4UHWL2AXTGlVBECOMZ1xyj31bXmww4k90=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=fjRD+KHYQibeEY4fM5VQLMQ1/3c4ah85nEQsX8pUfiCOKjmxiyVFpG/kDYXpvByFtkeVm7YVVjzEo/eurxPPcDJ0Ot1yvFdC13kuTjxORAcvXtD2G4guIDXvjBF8W98zkxH63U6C1lTh+SuNnW9fk2syiEoy9wx3ZWk9senKVpQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 493EA251D0; Mon, 18 Nov 2024 12:22:25 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id n0vKdHgXdybU; Mon, 18 Nov 2024 12:22:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1731928941; bh=BNV/5tvbkj4UHWL2AXTGlVBECOMZ1xyj31bXmww4k90=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=DNYkad01OJyddo5OcnPqAqRQ1dlpp4hI6hV2Xw3fbhT5HjbhWZ8nKcV5ihVi3tP9k YLpByB8g8nP19huq0krnHtz/4GAvSNYbT8x8hxw/jUsjxId2lb+Az8IYrdeNN96zXQ p+Bv4sbK6I2egHChG+4Ri0XUvuHpVMmRcWXPsS1ZDxXtjb/BCRophvRhf+UNjLjpws XEr7x1yIWd8+cnwJobiq6ZDqn+avz7ghDIsyTihJBa0G4zZ/H6ck/0ZSoWG0JfRdNV CvIT4SMX79Kp4O65vR0Y6sGvoGmONdPuWD8FCy54V0DbQJrHQwCemBcNQTkavW3sjw j+MJ1BiV+NKtA== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 08/13] htl: move pthread_attr_setstacksize into libc. Date: Mon, 18 Nov 2024 13:21:40 +0200 Message-Id: <20241118112145.50259-9-gfleury@disroot.org> In-Reply-To: <20241118112145.50259-1-gfleury@disroot.org> References: <20241118112145.50259-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, 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 Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 4 +++- sysdeps/htl/pt-attr-setstacksize.c | 7 ++++++- 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 - 7 files changed, 14 insertions(+), 5 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 86bf4bc4..7ffb6e62 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -31,7 +31,6 @@ libpthread-routines := \ pt-attr-setscope \ pt-attr-setstack \ pt-attr-setstackaddr \ - pt-attr-setstacksize \ pt-barrier-destroy \ pt-barrier-init \ pt-barrier-wait \ @@ -211,6 +210,7 @@ routines := \ pt-attr-getstacksize \ pt-attr-getstackaddr \ pt-attr-getstack \ + pt-attr-setstacksize \ # routines shared-only-routines = forward diff --git a/htl/Versions b/htl/Versions index 05b7765e..096b1c32 100644 --- a/htl/Versions +++ b/htl/Versions @@ -19,6 +19,7 @@ libc { pthread_attr_getstacksize; pthread_attr_getstackaddr; pthread_attr_getstack; + pthread_attr_setstacksize; } GLIBC_2.21 { @@ -53,6 +54,7 @@ libc { pthread_attr_getstacksize; pthread_attr_getstackaddr; pthread_attr_getstack; + pthread_attr_setstacksize; } @@ -67,6 +69,7 @@ libc { __pthread_attr_getstacksize; __pthread_attr_getstackaddr; __pthread_attr_getstack; + __pthread_attr_setstacksize; } } @@ -99,7 +102,6 @@ libpthread { pthread_attr_setguardsize; pthread_attr_setschedparam; pthread_attr_setscope; pthread_attr_setstack; pthread_attr_setstackaddr; - pthread_attr_setstacksize; pthread_barrier_destroy; pthread_barrier_init; pthread_barrier_wait; pthread_barrierattr_destroy; pthread_barrierattr_getpshared; diff --git a/sysdeps/htl/pt-attr-setstacksize.c b/sysdeps/htl/pt-attr-setstacksize.c index 256f0588..26651305 100644 --- a/sysdeps/htl/pt-attr-setstacksize.c +++ b/sysdeps/htl/pt-attr-setstacksize.c @@ -17,6 +17,7 @@ . */ #include +#include #include int @@ -25,4 +26,8 @@ __pthread_attr_setstacksize (pthread_attr_t *attr, size_t stacksize) attr->__stacksize = stacksize; return 0; } -weak_alias (__pthread_attr_setstacksize, pthread_attr_setstacksize) +versioned_symbol (libc, __pthread_attr_setstacksize, pthread_attr_setstacksize, GLIBC_2_41); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41) +compat_symbol (libpthread, __pthread_attr_setstacksize,pthread_attr_setstacksize, GLIBC_2_12); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 6330e4b1..08a3bddd 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -42,6 +42,7 @@ GLIBC_2.12 pthread_attr_getstacksize F GLIBC_2.12 pthread_attr_setdetachstate F GLIBC_2.12 pthread_attr_setinheritsched F GLIBC_2.12 pthread_attr_setschedpolicy F +GLIBC_2.12 pthread_attr_setstacksize F GLIBC_2.12 pthread_equal F GLIBC_2.12 pthread_getschedparam F GLIBC_2.12 pthread_self F @@ -2095,6 +2096,7 @@ 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.41 pthread_attr_setstacksize F GLIBC_2.3 __ctype_b_loc F GLIBC_2.3 __ctype_tolower_loc F GLIBC_2.3 __ctype_toupper_loc F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 2f50e329..1c0610c5 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -28,7 +28,6 @@ GLIBC_2.12 pthread_attr_setschedparam F 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_barrier_init F GLIBC_2.12 pthread_barrier_wait F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 3e829c3b..8fad3bca 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1521,6 +1521,7 @@ 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_setstacksize F GLIBC_2.38 pthread_attr_init F GLIBC_2.38 pthread_attr_setdetachstate F GLIBC_2.38 pthread_attr_setinheritsched F @@ -2192,6 +2193,7 @@ 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.41 pthread_attr_setstacksize F HURD_CTHREADS_0.3 __cthread_getspecific F HURD_CTHREADS_0.3 __cthread_keycreate F HURD_CTHREADS_0.3 __cthread_setspecific F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index e3c04abe..9626176f 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -45,7 +45,6 @@ GLIBC_2.38 pthread_attr_setschedparam F 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_barrier_init F GLIBC_2.38 pthread_barrier_wait F From patchwork Mon Nov 18 11:21:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 101432 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 39C51385B525 for ; Mon, 18 Nov 2024 11:27:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 39C51385B525 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=disroot.org header.i=@disroot.org header.a=rsa-sha256 header.s=mail header.b=RZD9tXHE X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) by sourceware.org (Postfix) with ESMTPS id 0E322385B53C for ; Mon, 18 Nov 2024 11:22:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0E322385B53C Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=disroot.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0E322385B53C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928953; cv=none; b=bbse8KIYLQImJelwmoIlizBGry/nbAUvIe6b+kx5/3tJCVl/xhRpaDFmdESyxmmByNWl2z13AFRcVhFgm79QefRUgZ4ZrXUJETpw68w973wEnG1CvR6IQ3QrletIjbdEHRjc/sSid7MJzfUAYltgjX1O56emtOEGWCk/K1N8HrA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928953; c=relaxed/simple; bh=FE+bRpJFZCw4NDbRXCQsKMXXnpsmE1reCGScoyCCwH8=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=a0eWu7d18k6WWBOSsbi9g7DEycTUSyBEp8LquZtrxGgCSS2IKRF/xdlFA1yg9pGKlsqPHe522j6hTv2oYxtIK52ZSETVgB+XO1AlsVpbUHm8Vbexhuks2+R6pCWKhqRtEiUbKJT9RbCjQjWgQ7wv0G1Jaf7XRb2z+zq8G8Tjv8U= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 2600625321; Mon, 18 Nov 2024 12:22:23 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id zIEI9lgDDbOM; Mon, 18 Nov 2024 12:22:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1731928942; bh=FE+bRpJFZCw4NDbRXCQsKMXXnpsmE1reCGScoyCCwH8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=RZD9tXHEDaXX17en30aSEF2+jDB1E2HPDrnOS7wHTtKpq5pHrab6I1rNgK8XnKJXL 6nlXXpMrF7Mdd7owsoBWZvAEgQLaLBjcb8gmb4yEygN6WHgfa1DqGYE3be1IdszBNQ v/kxJu92sZiapfhgqxqsMa/udlfQJczTrq8A3oqQhCzYlaXxEG7cR8OTDB+nf4TYkw 9dPgvo5/MGGpuXMt3V+/pQsT3NEedMCOsqxPubaKJDVmzTmYVcXEMlfLPo7xFtWpiO BxJK+cwbedGCtM6Px/iL6xejsOU9psfEqLgc0wJFKR/hh9Cztc2q4SUmj5rYisOdQ0 43MzPX/O7EUSQ== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 09/13] htl: move pthread_attr_setstackaddr into libc. Date: Mon, 18 Nov 2024 13:21:41 +0200 Message-Id: <20241118112145.50259-10-gfleury@disroot.org> In-Reply-To: <20241118112145.50259-1-gfleury@disroot.org> References: <20241118112145.50259-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, 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 Signed-off-by: gfleury --- htl/Makefile | 4 ++-- htl/Versions | 8 +++++++- sysdeps/htl/pt-attr-setstack.c | 8 ++++++-- sysdeps/htl/pt-attr-setstackaddr.c | 7 ++++++- 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 -- 8 files changed, 29 insertions(+), 10 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 7ffb6e62..db8b5709 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -29,8 +29,6 @@ libpthread-routines := \ pt-attr-setguardsize \ pt-attr-setschedparam \ pt-attr-setscope \ - pt-attr-setstack \ - pt-attr-setstackaddr \ pt-barrier-destroy \ pt-barrier-init \ pt-barrier-wait \ @@ -211,6 +209,8 @@ routines := \ pt-attr-getstackaddr \ pt-attr-getstack \ pt-attr-setstacksize \ + pt-attr-setstackaddr \ + pt-attr-setstack \ # routines shared-only-routines = forward diff --git a/htl/Versions b/htl/Versions index 096b1c32..db8a2de2 100644 --- a/htl/Versions +++ b/htl/Versions @@ -20,6 +20,8 @@ libc { pthread_attr_getstackaddr; pthread_attr_getstack; pthread_attr_setstacksize; + pthread_attr_setstackaddr; + pthread_attr_setstack; } GLIBC_2.21 { @@ -55,6 +57,8 @@ libc { pthread_attr_getstackaddr; pthread_attr_getstack; pthread_attr_setstacksize; + pthread_attr_setstackaddr; + pthread_attr_setstack; } @@ -70,6 +74,8 @@ libc { __pthread_attr_getstackaddr; __pthread_attr_getstack; __pthread_attr_setstacksize; + __pthread_attr_setstackaddr; + __pthread_attr_setstack; } } @@ -101,7 +107,7 @@ libpthread { pthread_attr_init; pthread_attr_setguardsize; pthread_attr_setschedparam; - pthread_attr_setscope; pthread_attr_setstack; pthread_attr_setstackaddr; + pthread_attr_setscope; pthread_barrier_destroy; pthread_barrier_init; pthread_barrier_wait; pthread_barrierattr_destroy; pthread_barrierattr_getpshared; diff --git a/sysdeps/htl/pt-attr-setstack.c b/sysdeps/htl/pt-attr-setstack.c index 9ac6fe14..d83bad87 100644 --- a/sysdeps/htl/pt-attr-setstack.c +++ b/sysdeps/htl/pt-attr-setstack.c @@ -18,7 +18,7 @@ #include #include - +#include #include #include @@ -47,4 +47,8 @@ __pthread_attr_setstack (pthread_attr_t *attr, void *stackaddr, size_t stacksize return 0; } -weak_alias (__pthread_attr_setstack, pthread_attr_setstack) +versioned_symbol (libc, __pthread_attr_setstack, pthread_attr_setstack, GLIBC_2_41); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41) +compat_symbol (libpthread, __pthread_attr_setstack, pthread_attr_setstack, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pt-attr-setstackaddr.c b/sysdeps/htl/pt-attr-setstackaddr.c index c4fda746..3bdd6e0b 100644 --- a/sysdeps/htl/pt-attr-setstackaddr.c +++ b/sysdeps/htl/pt-attr-setstackaddr.c @@ -17,6 +17,7 @@ . */ #include +#include #include int @@ -25,4 +26,8 @@ __pthread_attr_setstackaddr (pthread_attr_t *attr, void *stackaddr) attr->__stackaddr = stackaddr; return 0; } -weak_alias (__pthread_attr_setstackaddr, pthread_attr_setstackaddr) +versioned_symbol (libc, __pthread_attr_setstackaddr, pthread_attr_setstackaddr, GLIBC_2_41); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41) +compat_symbol (libpthread, __pthread_attr_setstackaddr,pthread_attr_setstackaddr, GLIBC_2_12); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 08a3bddd..53a2ba6a 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -42,6 +42,8 @@ GLIBC_2.12 pthread_attr_getstacksize F GLIBC_2.12 pthread_attr_setdetachstate F GLIBC_2.12 pthread_attr_setinheritsched F GLIBC_2.12 pthread_attr_setschedpolicy 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_equal F GLIBC_2.12 pthread_getschedparam F @@ -2096,6 +2098,8 @@ 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.41 pthread_attr_setstack F +GLIBC_2.41 pthread_attr_setstackaddr F GLIBC_2.41 pthread_attr_setstacksize F GLIBC_2.3 __ctype_b_loc F GLIBC_2.3 __ctype_tolower_loc F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 1c0610c5..61c6d869 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -26,8 +26,6 @@ GLIBC_2.12 pthread_attr_init F GLIBC_2.12 pthread_attr_setguardsize F GLIBC_2.12 pthread_attr_setschedparam F 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_barrier_destroy F GLIBC_2.12 pthread_barrier_init F GLIBC_2.12 pthread_barrier_wait F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 8fad3bca..c4e35fde 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1520,6 +1520,8 @@ 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_setstack F +GLIBC_2.38 pthread_attr_setstackaddr F GLIBC_2.38 pthread_attr_getstacksize F GLIBC_2.38 pthread_attr_setstacksize F GLIBC_2.38 pthread_attr_init F @@ -2193,6 +2195,8 @@ 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.41 pthread_attr_setstack F +GLIBC_2.41 pthread_attr_setstackaddr F GLIBC_2.41 pthread_attr_setstacksize 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 9626176f..2f57b852 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -43,8 +43,6 @@ GLIBC_2.38 pthread_attr_init F GLIBC_2.38 pthread_attr_setguardsize F GLIBC_2.38 pthread_attr_setschedparam F 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_barrier_destroy F GLIBC_2.38 pthread_barrier_init F GLIBC_2.38 pthread_barrier_wait F From patchwork Mon Nov 18 11:21:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 101425 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 C00FF385B830 for ; Mon, 18 Nov 2024 11:23:42 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) by sourceware.org (Postfix) with ESMTPS id 0C00D385B529 for ; Mon, 18 Nov 2024 11:22:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0C00D385B529 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=disroot.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0C00D385B529 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928964; cv=none; b=jOHZPqLhcAlyh7ltuTd+ektIRLNAjUPSLF1FHFNkWOQRo6BxahswH1aVZezXGM1yMtkrQR2Bs7zHaL3mEsZDC2Y/zRp5JQYoRZiT6ccHr9GjneHyQBvC+aImizf+XZIl8KYx+w6DODPfFC6AaTRdN6qrYcQQ0RdkyOscKk81nVM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928964; c=relaxed/simple; bh=hv6SbYDRj+cE+phomdxMFPRkAhzeDzxGAkxp9cyg1Aw=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=l38no5xSt53GoLYrEujFgSYEWwzQXs2vdwq5CQrkm7B5rKXEZr1rMnUily+HL0FMEv/Iv7j4XemzNQCvfHq6FLZA6yUBuCVUiHrZ3G8VTP1M/K5K+eb7SuJCTmwb+qbj+P0LY/UfKCyQ5mClKMLWZzskkuY8kAxTqHkIJUV3USM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0C00D385B529 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=disroot.org header.i=@disroot.org header.a=rsa-sha256 header.s=mail header.b=hwvQBVqK Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 6310A2518B; Mon, 18 Nov 2024 12:22:24 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 9W6h03D3RKNC; Mon, 18 Nov 2024 12:22:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1731928943; bh=hv6SbYDRj+cE+phomdxMFPRkAhzeDzxGAkxp9cyg1Aw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=hwvQBVqKs/iveaF7+tZghSToYQa65SdsOr+0FPtzpXlo7I/tzK1Ow7BFWn0YeLhLe 25mbB6EAA/yERjk0+bJ5uWOX1LHm5xZp64itQA5q5c6FkCbTU5jjqTMvEgo70SFiwg NXf5GYeXwtk+7Kcc1U5NTaicSLGqiUSgpqT5r2TvIbNd6SErUo4NyX+AIx7fttsgBG jRa9aOG2e4g3OAdsMZSijj7tbBnMQxo0k/Sz9Wof40YGWkkPCfm2o57KiBy/TBCsxa 4pKyuKgkM2tKL/o8vS8a45BilTXQlLUkYDUim6i2/3gF4GgF1hqKWlCs3ZLjGuVmeO JNekwHcuEWT1Q== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 10/13] htl: move pthread_attr_setscope into libc. Date: Mon, 18 Nov 2024 13:21:42 +0200 Message-Id: <20241118112145.50259-11-gfleury@disroot.org> In-Reply-To: <20241118112145.50259-1-gfleury@disroot.org> References: <20241118112145.50259-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, 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 Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 2 +- htl/forward.c | 4 ---- htl/pt-initialize.c | 1 - sysdeps/htl/pt-attr-setscope.c | 6 +++++- sysdeps/htl/pthread-functions.h | 2 -- sysdeps/mach/hurd/i386/libc.abilist | 1 + sysdeps/mach/hurd/i386/libpthread.abilist | 1 - sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 - 9 files changed, 8 insertions(+), 12 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index db8b5709..db3755fe 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -28,7 +28,6 @@ libpthread-routines := \ pt-attr-init \ pt-attr-setguardsize \ pt-attr-setschedparam \ - pt-attr-setscope \ pt-barrier-destroy \ pt-barrier-init \ pt-barrier-wait \ @@ -211,6 +210,7 @@ routines := \ pt-attr-setstacksize \ pt-attr-setstackaddr \ pt-attr-setstack \ + pt-attr-setscope \ # routines shared-only-routines = forward diff --git a/htl/Versions b/htl/Versions index db8a2de2..01f9f27a 100644 --- a/htl/Versions +++ b/htl/Versions @@ -22,6 +22,7 @@ libc { pthread_attr_setstacksize; pthread_attr_setstackaddr; pthread_attr_setstack; + pthread_attr_setscope; } GLIBC_2.21 { @@ -107,7 +108,6 @@ libpthread { pthread_attr_init; pthread_attr_setguardsize; pthread_attr_setschedparam; - pthread_attr_setscope; pthread_barrier_destroy; pthread_barrier_init; pthread_barrier_wait; pthread_barrierattr_destroy; pthread_barrierattr_getpshared; diff --git a/htl/forward.c b/htl/forward.c index 6644d67d..105b46cf 100644 --- a/htl/forward.c +++ b/htl/forward.c @@ -59,10 +59,6 @@ FORWARD (pthread_attr_setschedparam, (pthread_attr_t *attr, const struct sched_param *param), (attr, param), 0) -FORWARD (pthread_attr_setscope, (pthread_attr_t *attr, int scope), - (attr, scope), 0) - - FORWARD (pthread_condattr_destroy, (pthread_condattr_t *attr), (attr), 0) FORWARD (pthread_condattr_init, (pthread_condattr_t *attr), (attr), 0) diff --git a/htl/pt-initialize.c b/htl/pt-initialize.c index 0d20f39e..80afc5e8 100644 --- a/htl/pt-initialize.c +++ b/htl/pt-initialize.c @@ -29,7 +29,6 @@ static const struct pthread_functions pthread_functions = { .ptr_pthread_attr_init = __pthread_attr_init, .ptr_pthread_attr_setschedparam = __pthread_attr_setschedparam, - .ptr_pthread_attr_setscope = __pthread_attr_setscope, .ptr_pthread_condattr_destroy = __pthread_condattr_destroy, .ptr_pthread_condattr_init = __pthread_condattr_init, .ptr_pthread_cond_broadcast = __pthread_cond_broadcast, diff --git a/sysdeps/htl/pt-attr-setscope.c b/sysdeps/htl/pt-attr-setscope.c index 9d5617fc..5a932add 100644 --- a/sysdeps/htl/pt-attr-setscope.c +++ b/sysdeps/htl/pt-attr-setscope.c @@ -17,6 +17,7 @@ . */ #include +#include #include int @@ -37,5 +38,8 @@ __pthread_attr_setscope (pthread_attr_t *attr, int contentionscope) return EINVAL; } } +versioned_symbol (libc, __pthread_attr_setscope, pthread_attr_setscope, GLIBC_2_21); -weak_alias (__pthread_attr_setscope, pthread_attr_setscope); +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21) +compat_symbol (libc, __pthread_attr_setscope, pthread_attr_setscope, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthread-functions.h b/sysdeps/htl/pthread-functions.h index c95735ec..2d7a543b 100644 --- a/sysdeps/htl/pthread-functions.h +++ b/sysdeps/htl/pthread-functions.h @@ -24,7 +24,6 @@ int __pthread_attr_init (pthread_attr_t *); int __pthread_attr_setschedparam (pthread_attr_t *, const struct sched_param *); -int __pthread_attr_setscope (pthread_attr_t *, int); int __pthread_condattr_destroy (pthread_condattr_t *); int __pthread_condattr_init (pthread_condattr_t *); int __pthread_cond_broadcast (pthread_cond_t *); @@ -66,7 +65,6 @@ struct pthread_functions int (*ptr_pthread_attr_init) (pthread_attr_t *); int (*ptr_pthread_attr_setschedparam) (pthread_attr_t *, const struct sched_param *); - int (*ptr_pthread_attr_setscope) (pthread_attr_t *, int); int (*ptr_pthread_condattr_destroy) (pthread_condattr_t *); int (*ptr_pthread_condattr_init) (pthread_condattr_t *); int (*ptr_pthread_cond_broadcast) (pthread_cond_t *); diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 53a2ba6a..669e48c9 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -42,6 +42,7 @@ GLIBC_2.12 pthread_attr_getstacksize F GLIBC_2.12 pthread_attr_setdetachstate F GLIBC_2.12 pthread_attr_setinheritsched F GLIBC_2.12 pthread_attr_setschedpolicy F +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 diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 61c6d869..83e3a06d 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_attr_init F GLIBC_2.12 pthread_attr_setguardsize F GLIBC_2.12 pthread_attr_setschedparam F -GLIBC_2.12 pthread_attr_setscope F GLIBC_2.12 pthread_barrier_destroy F GLIBC_2.12 pthread_barrier_init F GLIBC_2.12 pthread_barrier_wait F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index 2f57b852..b4f54f5f 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_attr_init F GLIBC_2.38 pthread_attr_setguardsize F GLIBC_2.38 pthread_attr_setschedparam F -GLIBC_2.38 pthread_attr_setscope F GLIBC_2.38 pthread_barrier_destroy F GLIBC_2.38 pthread_barrier_init F GLIBC_2.38 pthread_barrier_wait F From patchwork Mon Nov 18 11:21:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 101433 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 DDFED385B525 for ; Mon, 18 Nov 2024 11:28:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DDFED385B525 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=disroot.org header.i=@disroot.org header.a=rsa-sha256 header.s=mail header.b=TU5YHAXK X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) by sourceware.org (Postfix) with ESMTPS id 07425385B524 for ; Mon, 18 Nov 2024 11:22:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 07425385B524 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=disroot.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 07425385B524 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928965; cv=none; b=mdEV/S1DDQUcs0UD9sEUSpbGdR8NCzEla3NqGbsCK3i6jyqEMUI3x5SzGVxBeTMnYdGFGTbnWQYh57pNJemN+hYsVvlmLjNQGXEMx/fj55LXItm4xY9MZt/hoLM00YIhz8BFueEk93+7nleqZXgmaXZDxevBdvwQl/I+Upooqg0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928965; c=relaxed/simple; bh=dWpaCjhMtaf08z5MQcpI5n4VMo3YUG/nM7V6iSpHknM=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=LNktsMzYVoI+Z60IpuUj1AjZg1r28fi33b4XKlfNr0BA9N1edtZ1tYZmcw3Y/wm4xF9i0BN2ft0saRWzLFUl/QDC/+st1W8WuI7nkvwx7lOtBfjxW4hRjcIU9HamETCicWiNokmaaFGluq2TVuPe3zYCILrvXTqAVfkymn+fDnY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 8BF152532C; Mon, 18 Nov 2024 12:22:25 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id dSQsjew8wUmJ; Mon, 18 Nov 2024 12:22:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1731928944; bh=dWpaCjhMtaf08z5MQcpI5n4VMo3YUG/nM7V6iSpHknM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=TU5YHAXKVaEtqAYBlxemf9obLcI13eqz83upSEiC6tyKtg7KaVEpmqC1eP8obVrSN qTAOvPxgPJD1TZ4dKnC85rHUShSaAcde+QPP3zt8ubqCscNF11pY0VsBNCMCrhp41g xXHZfQrxIw4H2FCLAut5Wa60N1RmL5WLSKSXB911KG6O/gdK4e1ZwH0jdu4DhLUqUG VWvHtzIUvoVtvYiyaefmiuRHldWR1QatR3buiFTxevoJ6S+CwAu4WL+ind005laauk LHw92J1d/HYTFIy6h6DXCwBGJUM3WxyOGHFC6eqkw4zRqS5AQMrlv4gnmyBC0t/s9d 2Xf4B6kjJxAqQ== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 11/13] htl: move pthread_attr_setschedparam into libc. Date: Mon, 18 Nov 2024 13:21:43 +0200 Message-Id: <20241118112145.50259-12-gfleury@disroot.org> In-Reply-To: <20241118112145.50259-1-gfleury@disroot.org> References: <20241118112145.50259-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, 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 Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 2 +- htl/forward.c | 4 ---- htl/pt-initialize.c | 1 - sysdeps/htl/pt-attr-setschedparam.c | 7 +++++-- sysdeps/htl/pthread-functions.h | 4 ---- sysdeps/mach/hurd/i386/libc.abilist | 1 + sysdeps/mach/hurd/i386/libpthread.abilist | 1 - sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 - 9 files changed, 8 insertions(+), 15 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index db3755fe..20232f9e 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -27,7 +27,6 @@ LCLHDRS := libpthread-routines := \ pt-attr-init \ pt-attr-setguardsize \ - pt-attr-setschedparam \ pt-barrier-destroy \ pt-barrier-init \ pt-barrier-wait \ @@ -211,6 +210,7 @@ routines := \ pt-attr-setstackaddr \ pt-attr-setstack \ pt-attr-setscope \ + pt-attr-setschedparam \ # routines shared-only-routines = forward diff --git a/htl/Versions b/htl/Versions index 01f9f27a..8ecb2fd8 100644 --- a/htl/Versions +++ b/htl/Versions @@ -23,6 +23,7 @@ libc { pthread_attr_setstackaddr; pthread_attr_setstack; pthread_attr_setscope; + pthread_attr_setschedparam; } GLIBC_2.21 { @@ -107,7 +108,6 @@ libpthread { pthread_attr_init; pthread_attr_setguardsize; - pthread_attr_setschedparam; pthread_barrier_destroy; pthread_barrier_init; pthread_barrier_wait; pthread_barrierattr_destroy; pthread_barrierattr_getpshared; diff --git a/htl/forward.c b/htl/forward.c index 105b46cf..179ec60b 100644 --- a/htl/forward.c +++ b/htl/forward.c @@ -55,10 +55,6 @@ name decl \ FORWARD (pthread_attr_init, (pthread_attr_t *attr), (attr), 0) -FORWARD (pthread_attr_setschedparam, - (pthread_attr_t *attr, const struct sched_param *param), - (attr, param), 0) - FORWARD (pthread_condattr_destroy, (pthread_condattr_t *attr), (attr), 0) FORWARD (pthread_condattr_init, (pthread_condattr_t *attr), (attr), 0) diff --git a/htl/pt-initialize.c b/htl/pt-initialize.c index 80afc5e8..835d7412 100644 --- a/htl/pt-initialize.c +++ b/htl/pt-initialize.c @@ -28,7 +28,6 @@ #if IS_IN (libpthread) static const struct pthread_functions pthread_functions = { .ptr_pthread_attr_init = __pthread_attr_init, - .ptr_pthread_attr_setschedparam = __pthread_attr_setschedparam, .ptr_pthread_condattr_destroy = __pthread_condattr_destroy, .ptr_pthread_condattr_init = __pthread_condattr_init, .ptr_pthread_cond_broadcast = __pthread_cond_broadcast, diff --git a/sysdeps/htl/pt-attr-setschedparam.c b/sysdeps/htl/pt-attr-setschedparam.c index 39a9cdf5..a60952fb 100644 --- a/sysdeps/htl/pt-attr-setschedparam.c +++ b/sysdeps/htl/pt-attr-setschedparam.c @@ -19,7 +19,7 @@ #include #include #include - +#include #include int @@ -34,5 +34,8 @@ __pthread_attr_setschedparam (pthread_attr_t *attr, return ENOTSUP; } +versioned_symbol (libc, __pthread_attr_setschedparam, pthread_attr_setschedparam, GLIBC_2_21); -weak_alias (__pthread_attr_setschedparam, pthread_attr_setschedparam); +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21) +compat_symbol (libc, __pthread_attr_setschedparam, pthread_attr_setschedparam, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthread-functions.h b/sysdeps/htl/pthread-functions.h index 2d7a543b..d760b929 100644 --- a/sysdeps/htl/pthread-functions.h +++ b/sysdeps/htl/pthread-functions.h @@ -22,8 +22,6 @@ #include int __pthread_attr_init (pthread_attr_t *); -int __pthread_attr_setschedparam (pthread_attr_t *, - const struct sched_param *); int __pthread_condattr_destroy (pthread_condattr_t *); int __pthread_condattr_init (pthread_condattr_t *); int __pthread_cond_broadcast (pthread_cond_t *); @@ -63,8 +61,6 @@ struct pthread_functions { int (*ptr_pthread_attr_destroy) (pthread_attr_t *); int (*ptr_pthread_attr_init) (pthread_attr_t *); - int (*ptr_pthread_attr_setschedparam) (pthread_attr_t *, - const struct sched_param *); int (*ptr_pthread_condattr_destroy) (pthread_condattr_t *); int (*ptr_pthread_condattr_init) (pthread_condattr_t *); int (*ptr_pthread_cond_broadcast) (pthread_cond_t *); diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 669e48c9..c448e757 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -42,6 +42,7 @@ GLIBC_2.12 pthread_attr_getstacksize F GLIBC_2.12 pthread_attr_setdetachstate F GLIBC_2.12 pthread_attr_setinheritsched F GLIBC_2.12 pthread_attr_setschedpolicy F +GLIBC_2.12 pthread_attr_setschedparam F GLIBC_2.12 pthread_attr_setscope F GLIBC_2.12 pthread_attr_setstack F GLIBC_2.12 pthread_attr_setstackaddr F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 83e3a06d..ea40657e 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -24,7 +24,6 @@ GLIBC_2.12 funlockfile F GLIBC_2.12 pthread_atfork F GLIBC_2.12 pthread_attr_init F GLIBC_2.12 pthread_attr_setguardsize F -GLIBC_2.12 pthread_attr_setschedparam F GLIBC_2.12 pthread_barrier_destroy F GLIBC_2.12 pthread_barrier_init F GLIBC_2.12 pthread_barrier_wait F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index b4f54f5f..eef91700 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -41,7 +41,6 @@ GLIBC_2.38 mtx_trylock F GLIBC_2.38 mtx_unlock F GLIBC_2.38 pthread_attr_init F GLIBC_2.38 pthread_attr_setguardsize F -GLIBC_2.38 pthread_attr_setschedparam F GLIBC_2.38 pthread_barrier_destroy F GLIBC_2.38 pthread_barrier_init F GLIBC_2.38 pthread_barrier_wait F From patchwork Mon Nov 18 11:21:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 101427 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 72C043856259 for ; Mon, 18 Nov 2024 11:24:17 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) by sourceware.org (Postfix) with ESMTPS id 0BF38385B53E for ; Mon, 18 Nov 2024 11:22:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0BF38385B53E Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=disroot.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0BF38385B53E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928967; cv=none; b=urJvZPUS8RF44h70d1OWxbErI2rzQhTf2Azs3eXk63wvqXCHjJaTwNA4/fHjN44fGxlYaHlpW/FDDJ3+STIrnHQBkI+u3sfNKQqwIp1o55nUUPl66gGzdN6YDB/Y+Vx4grZ5ZVwJpcJupLK7g5JAKlu+RSF2ezEm/woMNUBTOAs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928967; c=relaxed/simple; bh=sFbEHv5MYCeVOGMy/+iwIE4bYhJzwDmzDiz7VfY6oXM=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Zc36zJPpeb63hBo2Hw9jK33OFn34MD/+56OsG74es8SfJNJxkCxv20h9CXNQVrWa6O/td9g0zqRHWZ1t9fEUdP6mbzKVqeZYZL4BGc2A7dVnr8W8Ys6Pk8ilOwxXU3Jg+nvCK7RNldPiRNP6D90Cv92LqLWgFNxg0gSFfY4l/NU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id D61DF2521A; Mon, 18 Nov 2024 12:22:30 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id KWwiR9l0pjJ7; Mon, 18 Nov 2024 12:22:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1731928946; bh=sFbEHv5MYCeVOGMy/+iwIE4bYhJzwDmzDiz7VfY6oXM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=TyaOptrag48e3CTzM4mYk7G8a86i2wORjZTqWapTUrgdMPh9MnSkt/TC1+0sk5qKd m0T+tZ6r7VxzkNNvQK+bGRSSiHR1X5vVElG/Av133RJvxxWzeEE1uBQBKxgzvRKwQL 15+KidsdNtBFKO1ArzW5aHxXphYfAmGyV3ZYNWEaH95qJzzuzV/GYpnUxJ6Wn9ODI4 RP9M77MxwOWb3vdD0aeexy1KCH9KgKFJyamik2TGPCT/a2ipUifv57YtdFjfxvAc4a MMO/9u6OzJ2wPe3d1Y9WffXkENqkMi10oGYWkFEUOCSvlww+8qID9ExzZ8FVcrelzH M9MdeHw/JYTbw== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 12/13] htl: move pthread_attr_setguardsize into libc. Date: Mon, 18 Nov 2024 13:21:44 +0200 Message-Id: <20241118112145.50259-13-gfleury@disroot.org> In-Reply-To: <20241118112145.50259-1-gfleury@disroot.org> References: <20241118112145.50259-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, 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 Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 2 +- sysdeps/htl/pt-attr-setguardsize.c | 8 +++++++- 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 - 7 files changed, 13 insertions(+), 5 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 20232f9e..94c4ed1b 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -26,7 +26,6 @@ LCLHDRS := libpthread-routines := \ pt-attr-init \ - pt-attr-setguardsize \ pt-barrier-destroy \ pt-barrier-init \ pt-barrier-wait \ @@ -211,6 +210,7 @@ routines := \ pt-attr-setstack \ pt-attr-setscope \ pt-attr-setschedparam \ + pt-attr-setguardsize \ # routines shared-only-routines = forward diff --git a/htl/Versions b/htl/Versions index 8ecb2fd8..24d96647 100644 --- a/htl/Versions +++ b/htl/Versions @@ -61,6 +61,7 @@ libc { pthread_attr_setstacksize; pthread_attr_setstackaddr; pthread_attr_setstack; + pthread_attr_setguardsize; } @@ -107,7 +108,6 @@ libpthread { pthread_atfork; pthread_attr_init; - pthread_attr_setguardsize; pthread_barrier_destroy; pthread_barrier_init; pthread_barrier_wait; pthread_barrierattr_destroy; pthread_barrierattr_getpshared; diff --git a/sysdeps/htl/pt-attr-setguardsize.c b/sysdeps/htl/pt-attr-setguardsize.c index 50a9a9a7..92cd2b58 100644 --- a/sysdeps/htl/pt-attr-setguardsize.c +++ b/sysdeps/htl/pt-attr-setguardsize.c @@ -17,11 +17,17 @@ . */ #include +#include #include int -pthread_attr_setguardsize (pthread_attr_t *attr, size_t guardsize) +__pthread_attr_setguardsize (pthread_attr_t *attr, size_t guardsize) { attr->__guardsize = guardsize; return 0; } +versioned_symbol (libpthread, __pthread_attr_setguardsize, pthread_attr_setguardsize, GLIBC_2_41); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41) +compat_symbol (libpthread, __pthread_attr_setguardsize, pthread_attr_setguardsize, GLIBC_2_12); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index c448e757..52293d74 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -40,6 +40,7 @@ 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 +GLIBC_2.12 pthread_attr_setguardsize F GLIBC_2.12 pthread_attr_setinheritsched F GLIBC_2.12 pthread_attr_setschedpolicy F GLIBC_2.12 pthread_attr_setschedparam F @@ -2100,6 +2101,7 @@ 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.41 pthread_attr_setguardsize F GLIBC_2.41 pthread_attr_setstack F GLIBC_2.41 pthread_attr_setstackaddr F GLIBC_2.41 pthread_attr_setstacksize F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index ea40657e..86d79bbc 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_init F -GLIBC_2.12 pthread_attr_setguardsize F GLIBC_2.12 pthread_barrier_destroy F GLIBC_2.12 pthread_barrier_init F GLIBC_2.12 pthread_barrier_wait F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index c4e35fde..e38d5c66 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1526,6 +1526,7 @@ GLIBC_2.38 pthread_attr_getstacksize F GLIBC_2.38 pthread_attr_setstacksize F GLIBC_2.38 pthread_attr_init F GLIBC_2.38 pthread_attr_setdetachstate F +GLIBC_2.38 pthread_attr_setguardsize F GLIBC_2.38 pthread_attr_setinheritsched F GLIBC_2.38 pthread_attr_setschedparam F GLIBC_2.38 pthread_attr_setschedpolicy F @@ -2195,6 +2196,7 @@ 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.41 pthread_attr_setguardsize F GLIBC_2.41 pthread_attr_setstack F GLIBC_2.41 pthread_attr_setstackaddr F GLIBC_2.41 pthread_attr_setstacksize F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index eef91700..9e156b16 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_init F -GLIBC_2.38 pthread_attr_setguardsize F GLIBC_2.38 pthread_barrier_destroy F GLIBC_2.38 pthread_barrier_init F GLIBC_2.38 pthread_barrier_wait F From patchwork Mon Nov 18 11:21:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 101430 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 1B04F385B51A for ; Mon, 18 Nov 2024 11:26:16 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) by sourceware.org (Postfix) with ESMTPS id 08685385B521 for ; Mon, 18 Nov 2024 11:22:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 08685385B521 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=disroot.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 08685385B521 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928970; cv=none; b=gDs2nMF2E8QrBOpA9vxr5r6G4EAMZtK6MT+oVKcYAimtT6QwUYoPWlO35MrzGUqKTrlNsDfb8RX4C5NNOowr0TbwDAyUVLKy1C2mOIObJxUJIzJTPBQg0gRJD8gMhlF2n+ERdrgJ+Sz/hY8Oj27QXwkmsTz0WdlESFO5gh67aL8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731928970; c=relaxed/simple; bh=tz7g7YqsRGI8HoGXXWD0t23WMUQSnT6r8ERsfdFV2wA=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=eu3T0zGzq/RNmEMoPMmVhiFDSffIGO9WATVxeY9fa9pjjgxbaON6HIEt1L5JK/+cGpp5d6FC55u0e8DvdR3LgjA3wlyTS2cTypL6bBGcFo+wJeZPIWDkzGmYh5QTnh6Xm4t2dTzmYA3qOyuXFzH708128l/Jv4RyKgfQeQ1N6/Y= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id B0687252E8; Mon, 18 Nov 2024 12:22:31 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 3cO-MRFby3eB; Mon, 18 Nov 2024 12:22:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1731928947; bh=tz7g7YqsRGI8HoGXXWD0t23WMUQSnT6r8ERsfdFV2wA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=eeCoYlNHUkpMnteSff6uQG3K6DwG34uKG2phvxukODaNOsHGmvdF6Nhv8oIim8eJR qPjCRyXhuWuqQLPauMKf+J7FSU+wSEE4GUmWcPoVjzi0Qw/03zESTTTSgIRs1+t0x2 zzNFHRMpmG47IWvEhxQJvjCB4n1i7FhH0SWXTj1rhdFVX4EcmajM5u8AHPzX9OislP X9QgQLJtty/oOGo5ZNaW6wRpgcbWlPy0OyWZ33k5+h2tW+kvlRCI5tbmKKoLRyQCht zWgqQkSPCy+10/Sd5inohjhmgTvM78RmgcG2ZR/OdERNfBFZJIy/Zse/PdRkbHD0ml ZLvagOZpjrOcw== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 13/13] htl: move pthread_attr_init into libc. Date: Mon, 18 Nov 2024 13:21:45 +0200 Message-Id: <20241118112145.50259-14-gfleury@disroot.org> In-Reply-To: <20241118112145.50259-1-gfleury@disroot.org> References: <20241118112145.50259-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, 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 Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 4 ++-- htl/forward.c | 2 -- htl/pt-initialize.c | 1 - sysdeps/htl/pt-attr-init.c | 8 +++++++- sysdeps/htl/pthread-functions.h | 2 -- sysdeps/htl/pthreadP.h | 2 ++ sysdeps/mach/hurd/i386/libc.abilist | 2 ++ sysdeps/mach/hurd/i386/libpthread.abilist | 1 - sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 - 10 files changed, 14 insertions(+), 11 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 94c4ed1b..cb8ddfd9 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -25,7 +25,6 @@ SYSDEPS := lockfile LCLHDRS := libpthread-routines := \ - pt-attr-init \ pt-barrier-destroy \ pt-barrier-init \ pt-barrier-wait \ @@ -211,6 +210,7 @@ routines := \ pt-attr-setscope \ pt-attr-setschedparam \ pt-attr-setguardsize \ + pt-attr-init \ # routines shared-only-routines = forward diff --git a/htl/Versions b/htl/Versions index 24d96647..e116563d 100644 --- a/htl/Versions +++ b/htl/Versions @@ -24,6 +24,8 @@ libc { pthread_attr_setstack; pthread_attr_setscope; pthread_attr_setschedparam; + pthread_attr_init; + __pthread_attr_init; } GLIBC_2.21 { @@ -107,8 +109,6 @@ libpthread { pthread_atfork; - pthread_attr_init; - pthread_barrier_destroy; pthread_barrier_init; pthread_barrier_wait; pthread_barrierattr_destroy; pthread_barrierattr_getpshared; pthread_barrierattr_init; pthread_barrierattr_setpshared; diff --git a/htl/forward.c b/htl/forward.c index 179ec60b..7c0e16dc 100644 --- a/htl/forward.c +++ b/htl/forward.c @@ -53,8 +53,6 @@ name decl \ #define FORWARD(name, decl, params, defretval) \ FORWARD2 (name, int, decl, params, return defretval) -FORWARD (pthread_attr_init, (pthread_attr_t *attr), (attr), 0) - FORWARD (pthread_condattr_destroy, (pthread_condattr_t *attr), (attr), 0) FORWARD (pthread_condattr_init, (pthread_condattr_t *attr), (attr), 0) diff --git a/htl/pt-initialize.c b/htl/pt-initialize.c index 835d7412..b082a13b 100644 --- a/htl/pt-initialize.c +++ b/htl/pt-initialize.c @@ -27,7 +27,6 @@ #if IS_IN (libpthread) static const struct pthread_functions pthread_functions = { - .ptr_pthread_attr_init = __pthread_attr_init, .ptr_pthread_condattr_destroy = __pthread_condattr_destroy, .ptr_pthread_condattr_init = __pthread_condattr_init, .ptr_pthread_cond_broadcast = __pthread_cond_broadcast, diff --git a/sysdeps/htl/pt-attr-init.c b/sysdeps/htl/pt-attr-init.c index b01eb9ea..959df0cb 100644 --- a/sysdeps/htl/pt-attr-init.c +++ b/sysdeps/htl/pt-attr-init.c @@ -17,6 +17,7 @@ . */ #include +#include #include int @@ -27,4 +28,9 @@ __pthread_attr_init (pthread_attr_t *attr) *attr = __pthread_default_attr; return 0; } -weak_alias (__pthread_attr_init, pthread_attr_init); +libc_hidden_def (__pthread_attr_init) +versioned_symbol (libc, __pthread_attr_init, pthread_attr_init, GLIBC_2_21); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21) +compat_symbol (libc, __pthread_attr_init, pthread_attr_init, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthread-functions.h b/sysdeps/htl/pthread-functions.h index d760b929..c2caed25 100644 --- a/sysdeps/htl/pthread-functions.h +++ b/sysdeps/htl/pthread-functions.h @@ -21,7 +21,6 @@ #include -int __pthread_attr_init (pthread_attr_t *); int __pthread_condattr_destroy (pthread_condattr_t *); int __pthread_condattr_init (pthread_condattr_t *); int __pthread_cond_broadcast (pthread_cond_t *); @@ -60,7 +59,6 @@ int _cthreads_ftrylockfile (FILE *); struct pthread_functions { int (*ptr_pthread_attr_destroy) (pthread_attr_t *); - int (*ptr_pthread_attr_init) (pthread_attr_t *); int (*ptr_pthread_condattr_destroy) (pthread_condattr_t *); int (*ptr_pthread_condattr_init) (pthread_condattr_t *); int (*ptr_pthread_cond_broadcast) (pthread_cond_t *); diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index b0c9ceb2..0195b741 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -91,10 +91,12 @@ int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize); int __pthread_attr_getstack (const pthread_attr_t *, void **, size_t *); void __pthread_testcancel (void); +int __pthread_attr_init (pthread_attr_t *attr); #define __pthread_raise_internal(__sig) raise (__sig) libc_hidden_proto (__pthread_self) +libc_hidden_proto (__pthread_attr_init) #if IS_IN (libpthread) hidden_proto (__pthread_create) diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 52293d74..8cf51661 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -39,6 +39,8 @@ 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_init F +GLIBC_2.12 __pthread_attr_init F GLIBC_2.12 pthread_attr_setdetachstate F GLIBC_2.12 pthread_attr_setguardsize F GLIBC_2.12 pthread_attr_setinheritsched F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 86d79bbc..4e287c2e 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_init F GLIBC_2.12 pthread_barrier_destroy F GLIBC_2.12 pthread_barrier_init F GLIBC_2.12 pthread_barrier_wait F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index 9e156b16..3396ea9e 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_init F GLIBC_2.38 pthread_barrier_destroy F GLIBC_2.38 pthread_barrier_init F GLIBC_2.38 pthread_barrier_wait F