From patchwork Tue Nov 19 00:56:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 101473 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 28D9C385842A for ; Tue, 19 Nov 2024 00:57:25 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id C9EB13858D26 for ; Tue, 19 Nov 2024 00:56:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C9EB13858D26 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C9EB13858D26 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977797; cv=none; b=w0L+vl9tQkxYtbJswq1CHGfwVClIFbmQhNPJaiBLQdHwNGTZ9TAimal1b1EBm/Q1aGSoTBCYFJiQDTeZvTZT15GiZJfOA5CJOq26AvZEh22kUXbh4DKAZC8XSW9ad8NgVZTSMvzAbsjMbXDRryvCCyxaV8PEN1wCo5s3crlE4no= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977797; c=relaxed/simple; bh=eknUVK765WcepNGe6xVtKsT77KhUCYCH+CphULXn7Go=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=OGHLWKwf/zC3Xqc56mrOlLQRH5fMNMnkyzprytFGkK5DhiwyoFPfcwK4XK6n76vZOteqF3pvRPLlA2GAXMnsOhIprAJu6uMd81F9w9aPsZHjY6Ap2vQEdPufXiRNwymdj7foc8IWB2JYurkENL07sRusqNojmdohyBoHs+0mGgE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C9EB13858D26 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id D8E65A1C92; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2PCb2NYf5i1o; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from begin (aamiens-653-1-40-48.w83-192.abo.wanadoo.fr [83.192.199.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 6CA1BA1B5D; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1tDCXj-0000000CrOV-3jg3; Tue, 19 Nov 2024 01:56:35 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 01/13] htl: move pthread_attr_destroy into libc. Date: Tue, 19 Nov 2024 01:56:22 +0100 Message-ID: <20241119005634.3065147-2-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> References: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 2 +- htl/forward.c | 2 -- htl/pt-initialize.c | 1 - sysdeps/htl/pt-attr-destroy.c | 7 ++++++- 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 c5d1c473a0..bd1afe8009 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 \ @@ -199,6 +198,7 @@ routines := \ forward \ htlfreeres \ libc_pthread_init \ + pt-attr-destroy \ pt-attr-getdetachstate \ pt-attr-getinheritsched \ pt-attr-getschedparam \ diff --git a/htl/Versions b/htl/Versions index 949c1867fe..34b1f87a5f 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 ee89e50b3c..579e8cba4c 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 47b992fe06..0368bfa4c7 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 8b6814e447..3ad76fa365 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 f7b6fb7976..0a98d9f5d8 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 *); @@ -64,7 +63,6 @@ int _cthreads_ftrylockfile (FILE *); so if possible avoid breaking it and append new hooks to the end. */ 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 *); diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index dc2c6b505b..83c3218398 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 3ea7cb41fa..f8f5daf567 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 69999df5bb..54b3e34b9b 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 Tue Nov 19 00:56:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 101477 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 37AF7385840C for ; Tue, 19 Nov 2024 00:57:59 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id CA1D33858D35 for ; Tue, 19 Nov 2024 00:56:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CA1D33858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CA1D33858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977797; cv=none; b=ki0XbBCOpwT6Seu2GX/YTdNVrGbr7NI6Y6jF/ULYkyhmb5ZvWQh229VJLtYSJCR15SL2UApXERdj/EL9JtT/K6PmEsQdpPg4GF5vlqp0g+X99abc77SL9EhwxlQ3/TB9KjoVCsYF7+ZeQIFSlujuIgw5z1QkPF/ySHBGUjXXlYk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977797; c=relaxed/simple; bh=z1iBord1DKUYeVRwP3XfotsdCvR9EOp0Jrp2sD99OBc=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=TiK1m8N08jEkAcDlYOjxdKJqF2fyhOKt2cV2Fq7PooF6zq47mi4IrGSZcHJHIFShUUlyhrmELt4ViRnM1ZEF1Ho9LCldoe9QYcHNuDSO0BwHRZoSjZ9+v0AyPsShF8aNXbcL5vBaVmdaZkEl0t0dapoEmSqP8ceim1xNTch5MnA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CA1D33858D35 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id A22C4A1C3E; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nrdHImG5atPQ; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from begin (aamiens-653-1-40-48.w83-192.abo.wanadoo.fr [83.192.199.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 73A59A1BE9; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1tDCXj-0000000CrOY-3vC2; Tue, 19 Nov 2024 01:56:35 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 02/13] htl: move __pthread_default_attr into libc Date: Tue, 19 Nov 2024 01:56:23 +0100 Message-ID: <20241119005634.3065147-3-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> References: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 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 bd1afe8009..beb39e5fea 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 \ @@ -198,6 +197,7 @@ routines := \ forward \ htlfreeres \ libc_pthread_init \ + pt-attr \ pt-attr-destroy \ pt-attr-getdetachstate \ pt-attr-getinheritsched \ diff --git a/htl/Versions b/htl/Versions index 34b1f87a5f..05ef80548f 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 85a7d905e2..bdc8b83dc9 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 ddc2c80882..4f0ba83898 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 Tue Nov 19 00:56:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 101478 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 3F5E33858027 for ; Tue, 19 Nov 2024 00:58:37 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 3BEAB3858D37 for ; Tue, 19 Nov 2024 00:56:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3BEAB3858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3BEAB3858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977798; cv=none; b=JB0kSatL08ZwkvWUuUAXnVFZgDzg1qAEh3uR1OhMBVYQvwQ8XPfFGO6JpVEy8Vv7XJh016c8b4G75+UwGa96HvU/n3hmbTITQru+JGDeB67sSLaUMqgHDVpp8ApLDbnuyrMHbmnJeLHxbGptxtjgfKsYYFXOm2//1ER64NveOi0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977798; c=relaxed/simple; bh=bjD1NQISQPZZ5/JSPHVd0BW6N1tSsrfHJC+Tom28JZs=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=SoxSLMJtjGKnwdH5Jz97Abaelb+QErZFlNtuiSq2pgGbQ6chw/CHg79sA+FAp0RatcF6WEdEJWLk/n28QIFzAD8RAcrDcRSYEHT8uWNUZI34XqoQSFYh12G0zJbDd8C4LTW5Ponrtp9oH4XYffnMJ9dDksax/2HMfPX0owVDl9M= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id DBC5AA1C93; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Mtggo-8E3Tqo; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from begin (aamiens-653-1-40-48.w83-192.abo.wanadoo.fr [83.192.199.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 8118BA1BEB; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1tDCXj-0000000CrOb-45te; Tue, 19 Nov 2024 01:56:35 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 03/13] htl move pthread_attr_getguardsize into libc. Date: Tue, 19 Nov 2024 01:56:24 +0100 Message-ID: <20241119005634.3065147-4-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> References: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 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 beb39e5fea..0318f8561e 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 \ @@ -200,6 +199,7 @@ routines := \ pt-attr \ pt-attr-destroy \ pt-attr-getdetachstate \ + pt-attr-getguardsize \ pt-attr-getinheritsched \ pt-attr-getschedparam \ pt-attr-getschedpolicy \ diff --git a/htl/Versions b/htl/Versions index 05ef80548f..336d81bd7c 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 e9e56d0d60..986e212440 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 83c3218398..0a6f990c09 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 @@ -2483,6 +2484,7 @@ GLIBC_2.4 readlinkat F GLIBC_2.4 renameat F GLIBC_2.4 symlinkat F GLIBC_2.4 unlinkat F +GLIBC_2.41 pthread_attr_getguardsize F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index f8f5daf567..3451543da5 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 7c685645bb..ca72304ddc 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 54b3e34b9b..556cc6e2af 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 Tue Nov 19 00:56:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 101474 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 7E0253858294 for ; Tue, 19 Nov 2024 00:57:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E0253858294 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 409273858D3C for ; Tue, 19 Nov 2024 00:56:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 409273858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 409273858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977799; cv=none; b=MN0nSnPVK8M+Juaq+a77rFihzeW83yyEjkQUARxV5hhTYJ9aQqvOx9avIwdvFDRKBZjMiAxoZysLqjnsVE4+FyR9//yhkTayztZWmtr6CyGap7OomvuwAMLQmrTKsaJ0wsT8bXpwR4Li/euoutF4E3Bqr8Cuyixp5RP7wOh0OIE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977799; c=relaxed/simple; bh=4LwgSWJdmlRR0NoGlvGl60RBiyfh1D4QcPwigyRfmxU=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Rb+Eyw7nm7Che8DOnCQczJkL70HYAGnoK6qEjjqZUaxOG1EdpeZL4/zxnHM6ZApwatOw5hn/I7IzgTh/Zkjqzxxv7xHgl/sGa5kwsIuAQS4IVCWDx0CkAsc50xPZu1Fvn5looQVI+Y+qMBmJ6CV3Vv+6iG7cU2uuDglVd7tLc4o= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 06E37A1B5D; Tue, 19 Nov 2024 01:56:37 +0100 (CET) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qOPzVoO_esj6; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from begin (aamiens-653-1-40-48.w83-192.abo.wanadoo.fr [83.192.199.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 81650A1C0B; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1tDCXk-0000000CrOe-07p9; Tue, 19 Nov 2024 01:56:36 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 04/13] htl move pthread_attr_getscope into libc. Date: Tue, 19 Nov 2024 01:56:25 +0100 Message-ID: <20241119005634.3065147-5-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> References: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 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 0318f8561e..d8a5757d0b 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 \ @@ -203,6 +202,7 @@ routines := \ pt-attr-getinheritsched \ pt-attr-getschedparam \ pt-attr-getschedpolicy \ + pt-attr-getscope \ pt-attr-setdetachstate \ pt-attr-setinheritsched \ pt-attr-setschedpolicy \ diff --git a/htl/Versions b/htl/Versions index 336d81bd7c..4372c2de8f 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 579e8cba4c..6644d67da6 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 0368bfa4c7..0d20f39e51 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 a1ef854cc9..fe1f663b38 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 0a98d9f5d8..2a36f20152 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 *); @@ -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_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 0a6f990c09..8dd66f4a64 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 3451543da5..03fcee4ce6 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 556cc6e2af..1d18972651 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 Tue Nov 19 00:56:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 101479 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 ED45F385843B for ; Tue, 19 Nov 2024 00:58:53 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 0C45A3858CD9 for ; Tue, 19 Nov 2024 00:56:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0C45A3858CD9 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0C45A3858CD9 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977802; cv=none; b=acNssJg9YIRCt4DV1pqRyQXvGaFlFR/aBwfn0z429Vd7rzIKxrgQkqH1Ud6ZfWtKLnMYfj/oJSTWXn/nVOpZcx9bVSBREg1jJC6DnbHrDTxTdAyxTb9cLoZItyXCdHdPaV6U5Dh5rxrLZkq5vh8PL0N9fzA+VaV3LLTR1qt3FoE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977802; c=relaxed/simple; bh=gBcYtRRmS+Uzdls7b8eBK8SEi5xc3eEd2QN+LG8FZDo=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=HFRj3sg5nAXWH6LOsgFR1Vtt/JUUAmIpbNaoSwIUscFK0ROmeORQxR/V/gfDjmheXuhzj4IfuIyBajmBO2tJUjeTDlmNNK3gZX0jf30jzwWs2l9sphgSxuB+0r9fC2Ojo00m9dAsNBQ0pGod6VVwJ6KbwnyOhirq+5mcGXnYRqE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0C45A3858CD9 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 07F00A1BEB; Tue, 19 Nov 2024 01:56:37 +0100 (CET) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TNGH5sEHtf5e; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from begin (aamiens-653-1-40-48.w83-192.abo.wanadoo.fr [83.192.199.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 91950A1C13; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1tDCXk-0000000CrOh-0HfT; Tue, 19 Nov 2024 01:56:36 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 05/13] htl move pthread_attr_getstacksize into libc. Date: Tue, 19 Nov 2024 01:56:26 +0100 Message-ID: <20241119005634.3065147-6-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> References: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 5 ++++- sysdeps/htl/pt-attr-getstacksize.c | 8 +++++++- sysdeps/htl/pthreadP.h | 1 + sysdeps/mach/hurd/i386/libc.abilist | 2 ++ sysdeps/mach/hurd/i386/libpthread.abilist | 1 - sysdeps/mach/hurd/x86_64/libc.abilist | 2 ++ sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 - 8 files changed, 17 insertions(+), 5 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index d8a5757d0b..a4d900d5ff 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 \ @@ -203,6 +202,7 @@ routines := \ pt-attr-getschedparam \ pt-attr-getschedpolicy \ pt-attr-getscope \ + pt-attr-getstacksize \ pt-attr-setdetachstate \ pt-attr-setinheritsched \ pt-attr-setschedpolicy \ diff --git a/htl/Versions b/htl/Versions index 4372c2de8f..deca0d4109 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 1f05fe0d85..45589aa070 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,9 @@ __pthread_attr_getstacksize (const pthread_attr_t *attr, size_t * stacksize) *stacksize = attr->__stacksize; return 0; } -weak_alias (__pthread_attr_getstacksize, pthread_attr_getstacksize) +libc_hidden_def (__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/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index b0c9ceb23a..9aef867708 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -86,6 +86,7 @@ int __pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr, int __pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr); int __pthread_attr_getstacksize (const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize); +libc_hidden_proto (__pthread_attr_getstacksize) int __pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize); int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize); diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 8dd66f4a64..cb577ababf 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 @@ -2486,6 +2487,7 @@ GLIBC_2.4 renameat F GLIBC_2.4 symlinkat F GLIBC_2.4 unlinkat F GLIBC_2.41 pthread_attr_getguardsize F +GLIBC_2.41 pthread_attr_getstacksize F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 03fcee4ce6..8d700ff448 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 ca72304ddc..c0bf7367c6 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 1d18972651..c0bfe11d03 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 Tue Nov 19 00:56:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 101476 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7DDE9385828B for ; Tue, 19 Nov 2024 00:57:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7DDE9385828B X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 10D7A3858CDA for ; Tue, 19 Nov 2024 00:56:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 10D7A3858CDA Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 10D7A3858CDA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977802; cv=none; b=fHa6v6L8nLkrcBY2frZFkGvbIwSSzssNWl4UnqgLBB28eJnWwuDJvQnZrn+0iZxaTwxWOTpsFNWkizymnEKE4KyQXsvT2miqQEvySd7O2tPzHeo7MKVeicEnVlL5VRHOvxZZb4RGMHFW5jYs1pzJhCK1u8IQErw6Y3Kbx3RYQQc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977802; c=relaxed/simple; bh=QkZVVV5j0K8/CMVm1gjWG5muc0nmd7ezMyxGG6czf48=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=SSpAb+QOPH0uv/ipQ1NMpTr0tY0d00YY6lJUL0KT8eEhgU9magVEYnUl21ZQZyrz6+B4byv6bm+FycG5vawC+BWWj76p6SYIePMrsqekhE19sD0NuHXrXLExZiMDd3uLGzw+F/ACHS9qS3xoPnMUipay20JeE3CpyKXyXNvpN8w= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 27229A1C0B; Tue, 19 Nov 2024 01:56:37 +0100 (CET) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LGT4vk4DZeMo; Tue, 19 Nov 2024 01:56:37 +0100 (CET) Received: from begin (aamiens-653-1-40-48.w83-192.abo.wanadoo.fr [83.192.199.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 9C499A1C14; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1tDCXk-0000000CrOl-0Q9w; Tue, 19 Nov 2024 01:56:36 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 06/13] htl: move pthread_attr_getstackaddr into libc. Date: Tue, 19 Nov 2024 01:56:27 +0100 Message-ID: <20241119005634.3065147-7-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> References: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 5 ++++- sysdeps/htl/pt-attr-getstackaddr.c | 8 +++++++- sysdeps/htl/pthreadP.h | 1 + sysdeps/mach/hurd/i386/libc.abilist | 2 ++ sysdeps/mach/hurd/i386/libpthread.abilist | 1 - sysdeps/mach/hurd/x86_64/libc.abilist | 2 ++ sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 - 8 files changed, 17 insertions(+), 5 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index a4d900d5ff..1340c1b688 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -26,7 +26,6 @@ LCLHDRS := libpthread-routines := \ pt-attr-getstack \ - pt-attr-getstackaddr \ pt-attr-init \ pt-attr-setguardsize \ pt-attr-setschedparam \ @@ -202,6 +201,7 @@ routines := \ pt-attr-getschedparam \ pt-attr-getschedpolicy \ pt-attr-getscope \ + pt-attr-getstackaddr \ pt-attr-getstacksize \ pt-attr-setdetachstate \ pt-attr-setinheritsched \ diff --git a/htl/Versions b/htl/Versions index deca0d4109..f72569c63d 100644 --- a/htl/Versions +++ b/htl/Versions @@ -17,6 +17,7 @@ libc { pthread_attr_getguardsize; pthread_attr_getscope; pthread_attr_getstacksize; + pthread_attr_getstackaddr; } GLIBC_2.21 { @@ -49,6 +50,7 @@ libc { GLIBC_2.41 { pthread_attr_getguardsize; pthread_attr_getstacksize; + pthread_attr_getstackaddr; } @@ -61,6 +63,7 @@ libc { __pthread_init_thread; __pthread_default_attr; __pthread_attr_getstacksize; + __pthread_attr_getstackaddr; } } @@ -89,7 +92,7 @@ libpthread { pthread_atfork; - pthread_attr_getstack; pthread_attr_getstackaddr; + pthread_attr_getstack; pthread_attr_init; pthread_attr_setguardsize; pthread_attr_setschedparam; diff --git a/sysdeps/htl/pt-attr-getstackaddr.c b/sysdeps/htl/pt-attr-getstackaddr.c index 2782ee3b85..86f5e8d14a 100644 --- a/sysdeps/htl/pt-attr-getstackaddr.c +++ b/sysdeps/htl/pt-attr-getstackaddr.c @@ -17,6 +17,7 @@ . */ #include +#include #include int @@ -25,4 +26,9 @@ __pthread_attr_getstackaddr (const pthread_attr_t *attr, void **stackaddr) *stackaddr = attr->__stackaddr; return 0; } -weak_alias (__pthread_attr_getstackaddr, pthread_attr_getstackaddr) +libc_hidden_def (__pthread_attr_getstackaddr) +versioned_symbol (libc, __pthread_attr_getstackaddr, pthread_attr_getstackaddr, GLIBC_2_41); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41) +compat_symbol (libpthread, __pthread_attr_getstackaddr,pthread_attr_getstackaddr, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 9aef867708..a397112f52 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -83,6 +83,7 @@ int __pthread_setcancelstate (int state, int *oldstate); int __pthread_getattr_np (pthread_t, pthread_attr_t *); int __pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr); +libc_hidden_proto (__pthread_attr_getstackaddr) int __pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr); int __pthread_attr_getstacksize (const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize); diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index cb577ababf..d93a0f403b 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -36,6 +36,7 @@ GLIBC_2.12 pthread_attr_getinheritsched F GLIBC_2.12 pthread_attr_getschedparam F GLIBC_2.12 pthread_attr_getschedpolicy F GLIBC_2.12 pthread_attr_getscope F +GLIBC_2.12 pthread_attr_getstackaddr F GLIBC_2.12 pthread_attr_getstacksize F GLIBC_2.12 pthread_attr_setdetachstate F GLIBC_2.12 pthread_attr_setinheritsched F @@ -2487,6 +2488,7 @@ GLIBC_2.4 renameat F GLIBC_2.4 symlinkat F GLIBC_2.4 unlinkat F GLIBC_2.41 pthread_attr_getguardsize F +GLIBC_2.41 pthread_attr_getstackaddr F GLIBC_2.41 pthread_attr_getstacksize F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 8d700ff448..fed162643b 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -23,7 +23,6 @@ GLIBC_2.12 ftrylockfile F GLIBC_2.12 funlockfile F GLIBC_2.12 pthread_atfork F GLIBC_2.12 pthread_attr_getstack F -GLIBC_2.12 pthread_attr_getstackaddr F GLIBC_2.12 pthread_attr_init F GLIBC_2.12 pthread_attr_setguardsize F GLIBC_2.12 pthread_attr_setschedparam F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index c0bf7367c6..242c40e81e 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1518,6 +1518,7 @@ GLIBC_2.38 pthread_attr_getinheritsched F GLIBC_2.38 pthread_attr_getschedparam F GLIBC_2.38 pthread_attr_getschedpolicy F GLIBC_2.38 pthread_attr_getscope F +GLIBC_2.38 pthread_attr_getstackaddr F GLIBC_2.38 pthread_attr_getstacksize F GLIBC_2.38 pthread_attr_init F GLIBC_2.38 pthread_attr_setdetachstate F @@ -2187,6 +2188,7 @@ GLIBC_2.39 stdc_trailing_zeros_ul F GLIBC_2.39 stdc_trailing_zeros_ull F GLIBC_2.39 stdc_trailing_zeros_us F GLIBC_2.41 pthread_attr_getguardsize F +GLIBC_2.41 pthread_attr_getstackaddr F GLIBC_2.41 pthread_attr_getstacksize F HURD_CTHREADS_0.3 __cthread_getspecific F HURD_CTHREADS_0.3 __cthread_keycreate F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index c0bfe11d03..a1f74eb9f0 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -40,7 +40,6 @@ GLIBC_2.38 mtx_timedlock F GLIBC_2.38 mtx_trylock F GLIBC_2.38 mtx_unlock F GLIBC_2.38 pthread_attr_getstack F -GLIBC_2.38 pthread_attr_getstackaddr F GLIBC_2.38 pthread_attr_init F GLIBC_2.38 pthread_attr_setguardsize F GLIBC_2.38 pthread_attr_setschedparam F From patchwork Tue Nov 19 00:56:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 101481 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CE5513858294 for ; Tue, 19 Nov 2024 00:59:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CE5513858294 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 1AECE3858C62 for ; Tue, 19 Nov 2024 00:56:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1AECE3858C62 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1AECE3858C62 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977803; cv=none; b=tx5fmnLgkdPJet7WptMaNdiCrqYGjk1oAjEdUJNlTeaDte1DjtIdXBdf2bBnVc3diJT6ta0x3PEl87cDRZludVpyFBaB2AqncNb9MKeXhBOCBtbPUM+FhW3w6l69ml/cSx6LeCxNKEgX80xK0RCmbk1s1ouIDwBKZfpjqZPdKbU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977803; c=relaxed/simple; bh=+45NtPksrLVhNA1Kq+dvHB/xI9E/kBcygWVW4WN5nc8=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=hCM23jmN/N2Lzc5nQmoAEpdSIVEk072k6pXXbpE71kpRjd/jTWmYBujrIbZyXPj936XegL+ayDDVxbIEphkojfaJVTCLs+TQhrqiFcfQTPbf9VUcr236wX84LI3k3lejXcy+2rAcYyF2Rt3cDpP/Bfhb2YHRA2NxvECaWN2TtJw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1AECE3858C62 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 291BCA1C13; Tue, 19 Nov 2024 01:56:37 +0100 (CET) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7QCIz6nKvU2A; Tue, 19 Nov 2024 01:56:37 +0100 (CET) Received: from begin (aamiens-653-1-40-48.w83-192.abo.wanadoo.fr [83.192.199.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id A04BAA1C24; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1tDCXk-0000000CrOp-0Zxp; Tue, 19 Nov 2024 01:56:36 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 07/13] htl: move pthread_attr_getstack into libc. Date: Tue, 19 Nov 2024 01:56:28 +0100 Message-ID: <20241119005634.3065147-8-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> References: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 5 +++-- sysdeps/htl/pt-attr-getstack.c | 8 +++++++- sysdeps/htl/pthreadP.h | 1 + sysdeps/mach/hurd/i386/libc.abilist | 2 ++ sysdeps/mach/hurd/i386/libpthread.abilist | 1 - sysdeps/mach/hurd/x86_64/libc.abilist | 2 ++ sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 - 8 files changed, 16 insertions(+), 6 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 1340c1b688..d9faf5080c 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -25,7 +25,6 @@ SYSDEPS := lockfile LCLHDRS := libpthread-routines := \ - pt-attr-getstack \ pt-attr-init \ pt-attr-setguardsize \ pt-attr-setschedparam \ @@ -201,6 +200,7 @@ routines := \ pt-attr-getschedparam \ pt-attr-getschedpolicy \ pt-attr-getscope \ + pt-attr-getstack \ pt-attr-getstackaddr \ pt-attr-getstacksize \ pt-attr-setdetachstate \ diff --git a/htl/Versions b/htl/Versions index f72569c63d..05b7765efa 100644 --- a/htl/Versions +++ b/htl/Versions @@ -18,6 +18,7 @@ libc { pthread_attr_getscope; pthread_attr_getstacksize; pthread_attr_getstackaddr; + pthread_attr_getstack; } GLIBC_2.21 { @@ -51,6 +52,7 @@ libc { pthread_attr_getguardsize; pthread_attr_getstacksize; pthread_attr_getstackaddr; + pthread_attr_getstack; } @@ -64,6 +66,7 @@ libc { __pthread_default_attr; __pthread_attr_getstacksize; __pthread_attr_getstackaddr; + __pthread_attr_getstack; } } @@ -92,7 +95,6 @@ libpthread { pthread_atfork; - pthread_attr_getstack; pthread_attr_init; pthread_attr_setguardsize; pthread_attr_setschedparam; @@ -211,7 +213,6 @@ libpthread { __pthread_getspecific; __pthread_setspecific; __pthread_getattr_np; - __pthread_attr_getstack; __pthread_mutex_init; __pthread_mutex_destroy; __pthread_mutex_timedlock; diff --git a/sysdeps/htl/pt-attr-getstack.c b/sysdeps/htl/pt-attr-getstack.c index 42ab5fdd19..1a4baa3ec6 100644 --- a/sysdeps/htl/pt-attr-getstack.c +++ b/sysdeps/htl/pt-attr-getstack.c @@ -18,6 +18,7 @@ #include #include +#include #include int @@ -28,4 +29,9 @@ __pthread_attr_getstack (const pthread_attr_t *attr, __pthread_attr_getstacksize (attr, stacksize); return 0; } -weak_alias (__pthread_attr_getstack, pthread_attr_getstack) +libc_hidden_def (__pthread_attr_getstack) +versioned_symbol (libpthread, __pthread_attr_getstack, pthread_attr_getstack, GLIBC_2_41); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41) +compat_symbol (libpthread, __pthread_attr_getstack, pthread_attr_getstack, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index a397112f52..6cdafe7315 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -92,6 +92,7 @@ int __pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize); int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize); int __pthread_attr_getstack (const pthread_attr_t *, void **, size_t *); +libc_hidden_proto (__pthread_attr_getstack) void __pthread_testcancel (void); #define __pthread_raise_internal(__sig) raise (__sig) diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index d93a0f403b..5ecf2a0a50 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -36,6 +36,7 @@ GLIBC_2.12 pthread_attr_getinheritsched F GLIBC_2.12 pthread_attr_getschedparam F GLIBC_2.12 pthread_attr_getschedpolicy F GLIBC_2.12 pthread_attr_getscope F +GLIBC_2.12 pthread_attr_getstack F GLIBC_2.12 pthread_attr_getstackaddr F GLIBC_2.12 pthread_attr_getstacksize F GLIBC_2.12 pthread_attr_setdetachstate F @@ -2488,6 +2489,7 @@ GLIBC_2.4 renameat F GLIBC_2.4 symlinkat F GLIBC_2.4 unlinkat F GLIBC_2.41 pthread_attr_getguardsize F +GLIBC_2.41 pthread_attr_getstack F GLIBC_2.41 pthread_attr_getstackaddr F GLIBC_2.41 pthread_attr_getstacksize F GLIBC_2.5 __readlinkat_chk F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index fed162643b..2f50e32937 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -22,7 +22,6 @@ GLIBC_2.12 flockfile F GLIBC_2.12 ftrylockfile F GLIBC_2.12 funlockfile F GLIBC_2.12 pthread_atfork F -GLIBC_2.12 pthread_attr_getstack F GLIBC_2.12 pthread_attr_init F GLIBC_2.12 pthread_attr_setguardsize F GLIBC_2.12 pthread_attr_setschedparam F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 242c40e81e..3e829c3b8f 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1518,6 +1518,7 @@ GLIBC_2.38 pthread_attr_getinheritsched F GLIBC_2.38 pthread_attr_getschedparam F GLIBC_2.38 pthread_attr_getschedpolicy F GLIBC_2.38 pthread_attr_getscope F +GLIBC_2.38 pthread_attr_getstack F GLIBC_2.38 pthread_attr_getstackaddr F GLIBC_2.38 pthread_attr_getstacksize F GLIBC_2.38 pthread_attr_init F @@ -2188,6 +2189,7 @@ GLIBC_2.39 stdc_trailing_zeros_ul F GLIBC_2.39 stdc_trailing_zeros_ull F GLIBC_2.39 stdc_trailing_zeros_us F GLIBC_2.41 pthread_attr_getguardsize F +GLIBC_2.41 pthread_attr_getstack F GLIBC_2.41 pthread_attr_getstackaddr F GLIBC_2.41 pthread_attr_getstacksize F HURD_CTHREADS_0.3 __cthread_getspecific F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index a1f74eb9f0..e3c04abe73 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -39,7 +39,6 @@ GLIBC_2.38 mtx_lock F GLIBC_2.38 mtx_timedlock F GLIBC_2.38 mtx_trylock F GLIBC_2.38 mtx_unlock F -GLIBC_2.38 pthread_attr_getstack F GLIBC_2.38 pthread_attr_init F GLIBC_2.38 pthread_attr_setguardsize F GLIBC_2.38 pthread_attr_setschedparam F From patchwork Tue Nov 19 00:56:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 101482 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 4AC433858D21 for ; Tue, 19 Nov 2024 00:59:27 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 117E03858C98 for ; Tue, 19 Nov 2024 00:56:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 117E03858C98 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 117E03858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977803; cv=none; b=W3qs33GLYUk+oMbBW+EX5w6cxy22J7nT6lZauyUwrkGqbKGdARTxPit1PwTVQVGps/INTR3PC1vQwL31BgDMl4r+2DoeFSOD7wbME+DF9fpg2MNgh1KHXn5R9HYvDWAmR/QG6Cb/9xDdn7hNQgjPZeY4DObapjda4YsP6PIdpAA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977803; c=relaxed/simple; bh=DpQPfNSXkY40lh/iBB/4jwDzTcjvhFn619hsjZwRTXg=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=PrHCRjjrVuSenEHtdbPR+j7kSmnnjR7wdbpyWqpoC4l8Ktee3xyDgkdN9QD9LXTZ+bE8FRCaNMxh9fLz08D3f/CfjITxeJXAvTRyGkIz/ln0FgMg7bmMjf4ALtQwY75UBRBxZuQLhhK2NBy9yLYwgG1nG1nsxhRH5lAkamplQLY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 117E03858C98 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 46FDBA1C14; Tue, 19 Nov 2024 01:56:37 +0100 (CET) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d2_WqsV8ZQIg; Tue, 19 Nov 2024 01:56:37 +0100 (CET) Received: from begin (aamiens-653-1-40-48.w83-192.abo.wanadoo.fr [83.192.199.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id ADF48A1BE9; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1tDCXk-0000000CrOt-0gig; Tue, 19 Nov 2024 01:56:36 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 08/13] htl: move pthread_attr_setstacksize into libc. Date: Tue, 19 Nov 2024 01:56:29 +0100 Message-ID: <20241119005634.3065147-9-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> References: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 4 +++- sysdeps/htl/pt-attr-setstacksize.c | 8 +++++++- sysdeps/htl/pthreadP.h | 1 + sysdeps/mach/hurd/i386/libc.abilist | 2 ++ sysdeps/mach/hurd/i386/libpthread.abilist | 1 - sysdeps/mach/hurd/x86_64/libc.abilist | 2 ++ sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 - 8 files changed, 16 insertions(+), 5 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index d9faf5080c..445c0af8ae 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 \ @@ -206,6 +205,7 @@ routines := \ pt-attr-setdetachstate \ pt-attr-setinheritsched \ pt-attr-setschedpolicy \ + pt-attr-setstacksize \ pt-getschedparam \ pt-nthreads \ pt-pthread_self \ diff --git a/htl/Versions b/htl/Versions index 05b7765efa..096b1c32ff 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 256f058854..5526f7a25b 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,9 @@ __pthread_attr_setstacksize (pthread_attr_t *attr, size_t stacksize) attr->__stacksize = stacksize; return 0; } -weak_alias (__pthread_attr_setstacksize, pthread_attr_setstacksize) +libc_hidden_def (__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/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 6cdafe7315..f54c9490df 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -89,6 +89,7 @@ int __pthread_attr_getstacksize (const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize); libc_hidden_proto (__pthread_attr_getstacksize) int __pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize); +libc_hidden_proto (__pthread_attr_setstacksize) int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize); int __pthread_attr_getstack (const pthread_attr_t *, void **, size_t *); diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 5ecf2a0a50..d7946ed96a 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 @@ -2492,6 +2493,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.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 2f50e32937..1c0610c527 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 3e829c3b8f..46b8694afc 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1527,6 +1527,7 @@ GLIBC_2.38 pthread_attr_setinheritsched F GLIBC_2.38 pthread_attr_setschedparam F GLIBC_2.38 pthread_attr_setschedpolicy F GLIBC_2.38 pthread_attr_setscope F +GLIBC_2.38 pthread_attr_setstacksize F GLIBC_2.38 pthread_cond_broadcast F GLIBC_2.38 pthread_cond_destroy F GLIBC_2.38 pthread_cond_init 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 e3c04abe73..9626176f6d 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 Tue Nov 19 00:56:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 101475 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 75E11385842C for ; Tue, 19 Nov 2024 00:57:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 75E11385842C X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 1BBAD3858D21 for ; Tue, 19 Nov 2024 00:56:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1BBAD3858D21 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1BBAD3858D21 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977804; cv=none; b=O0pARbAnZaUWDVMqU0SUKBbuolMYu+GK6iMr0Eht9Zf6Q+ZFxkbwuXx/oZvYIgTQPgaCCVJOsSxLJ4rusHAQvWOXvyJpGK5150BW4a+feUXl/efG4tsE3mlzxrbF4wk7efrasbCAaCuYJKz9BUVssYjPOH6lqQSpnQXsSrh8B38= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977804; c=relaxed/simple; bh=9Xd4eXpHcsXsJXdRaM7AHZuBo+7gAEO69Qut93Iah+4=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=r7qCrD99llhgzypYh7SJ8+64Vdg33Gg3V4CZiuuagRPnu+fKv6rIyVeWftVyNSXV85GBEKqjj0BxaLX97v1QuytPNk5v2zRsc+k+ae93oEivGlZpny+hOpdIRJpkUhH8WZxsSkcaJqHXPDvwulFABUjL6UCuyyPenjzcCsqON4M= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 4756AA1C24; Tue, 19 Nov 2024 01:56:37 +0100 (CET) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wJ_PYUn7PDcp; Tue, 19 Nov 2024 01:56:37 +0100 (CET) Received: from begin (aamiens-653-1-40-48.w83-192.abo.wanadoo.fr [83.192.199.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id BAA36A1B24; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1tDCXk-0000000CrOw-0mDB; Tue, 19 Nov 2024 01:56:36 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 09/13] htl: move pthread_attr_setstackaddr into libc. Date: Tue, 19 Nov 2024 01:56:30 +0100 Message-ID: <20241119005634.3065147-10-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> References: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Signed-off-by: gfleury --- htl/Makefile | 4 ++-- htl/Versions | 8 +++++++- sysdeps/htl/pt-attr-setstack.c | 9 +++++++-- sysdeps/htl/pt-attr-setstackaddr.c | 8 +++++++- sysdeps/htl/pthreadP.h | 2 ++ sysdeps/mach/hurd/i386/libc.abilist | 4 ++++ sysdeps/mach/hurd/i386/libpthread.abilist | 2 -- sysdeps/mach/hurd/x86_64/libc.abilist | 4 ++++ sysdeps/mach/hurd/x86_64/libpthread.abilist | 2 -- 9 files changed, 33 insertions(+), 10 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 445c0af8ae..d76cba8830 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 \ @@ -205,6 +203,8 @@ routines := \ pt-attr-setdetachstate \ pt-attr-setinheritsched \ pt-attr-setschedpolicy \ + pt-attr-setstack \ + pt-attr-setstackaddr \ pt-attr-setstacksize \ pt-getschedparam \ pt-nthreads \ diff --git a/htl/Versions b/htl/Versions index 096b1c32ff..db8a2de27c 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 9ac6fe1404..c02a13b695 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,9 @@ __pthread_attr_setstack (pthread_attr_t *attr, void *stackaddr, size_t stacksize return 0; } -weak_alias (__pthread_attr_setstack, pthread_attr_setstack) +libc_hidden_def (__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 c4fda746b6..6941ef8544 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,9 @@ __pthread_attr_setstackaddr (pthread_attr_t *attr, void *stackaddr) attr->__stackaddr = stackaddr; return 0; } -weak_alias (__pthread_attr_setstackaddr, pthread_attr_setstackaddr) +libc_hidden_def (__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/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index f54c9490df..6f6f6dffc7 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -85,6 +85,7 @@ int __pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr); libc_hidden_proto (__pthread_attr_getstackaddr) int __pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr); +libc_hidden_proto (__pthread_attr_setstackaddr) int __pthread_attr_getstacksize (const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize); libc_hidden_proto (__pthread_attr_getstacksize) @@ -92,6 +93,7 @@ int __pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize); libc_hidden_proto (__pthread_attr_setstacksize) int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize); +libc_hidden_proto (__pthread_attr_setstack) int __pthread_attr_getstack (const pthread_attr_t *, void **, size_t *); libc_hidden_proto (__pthread_attr_getstack) void __pthread_testcancel (void); diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index d7946ed96a..dabb1359ba 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 @@ -2493,6 +2495,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.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 1c0610c527..61c6d869b5 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 46b8694afc..f4f65ca353 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1527,6 +1527,8 @@ GLIBC_2.38 pthread_attr_setinheritsched F GLIBC_2.38 pthread_attr_setschedparam F GLIBC_2.38 pthread_attr_setschedpolicy 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_cond_broadcast F GLIBC_2.38 pthread_cond_destroy 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 9626176f6d..2f57b85269 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 Tue Nov 19 00:56:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 101484 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 97468385840C for ; Tue, 19 Nov 2024 01:00:21 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 151C53858C56 for ; Tue, 19 Nov 2024 00:56:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 151C53858C56 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 151C53858C56 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977803; cv=none; b=QN5rMUZ+xnU2NNGojZInE1W0qRr6DWhqE6hd7KSUZD75z50NHs9sgbbp2MgXLUgl0/4X451ylG756hQB+14S6rfbYoxWTLcKstYmGD8317cxl3HLw8J2sd1UdkosQEgnD+3pvMZvyrwx5mJkYERq+No7jrrC2vw/86TvtT7XxLg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977803; c=relaxed/simple; bh=SPzr5MHCZpFIh+EqcazubEeKFA54ScRNOJw0gZLidqY=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Yv0/wQg0V9AwcSwRMWJXg11dwpzng1RZqIe1+4p1OAN8yqr6AJPRzqtWOQPhg/AVFJQuKjSCmAN4NsJuGZRoZxTvQVYmLQRivhWCXh6izU4lAP6sxJCdFsftMl/FTpWaTOIiWVp2n5+kaLOa6bsnAXHuv012Nti+JJH3W5ETrF0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 659C0A1B24; Tue, 19 Nov 2024 01:56:37 +0100 (CET) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cHHN1BKS8xn3; Tue, 19 Nov 2024 01:56:37 +0100 (CET) Received: from begin (aamiens-653-1-40-48.w83-192.abo.wanadoo.fr [83.192.199.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id BB918A1C8E; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1tDCXk-0000000CrP0-0roS; Tue, 19 Nov 2024 01:56:36 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 10/13] htl: move pthread_attr_setscope into libc. Date: Tue, 19 Nov 2024 01:56:31 +0100 Message-ID: <20241119005634.3065147-11-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> References: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 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 d76cba8830..eae1c70958 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 \ @@ -203,6 +202,7 @@ routines := \ pt-attr-setdetachstate \ pt-attr-setinheritsched \ pt-attr-setschedpolicy \ + pt-attr-setscope \ pt-attr-setstack \ pt-attr-setstackaddr \ pt-attr-setstacksize \ diff --git a/htl/Versions b/htl/Versions index db8a2de27c..01f9f27a37 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 6644d67da6..105b46cfea 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 0d20f39e51..80afc5e86a 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 9d5617fc89..5a932addb2 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 2a36f20152..1c691db6f3 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 *); @@ -65,7 +64,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 dabb1359ba..1c3d33821f 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 61c6d869b5..83e3a06dc3 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 2f57b85269..b4f54f5f5d 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 Tue Nov 19 00:56:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 101483 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 D1DE33858C56 for ; Tue, 19 Nov 2024 00:59:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D1DE33858C56 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 17C40385841E for ; Tue, 19 Nov 2024 00:56:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 17C40385841E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 17C40385841E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977813; cv=none; b=P94QkkkWeeeqpOZ1327bqP9sB4kDTM/oUi7/TH/LcbTATR9YDEUGreFJCKBLrBW8zAeShII1ss0v6inYu+PS7f8meFDvFgwXq8rNoL06cG2ONWhx+QdBD0oBEX3SIY+aXLw19JhxyBZb+KMh9HJODGZt7uWIgphxy32Ttb2YvWQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977813; c=relaxed/simple; bh=Iiy0YkBeyWrGKhMfGOo5/W1q0czpKsMA8QaDfUqNoK8=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=BJmF7HTsw6pfGnYdHxLeduukdpkVnR7FnlCWL01VvWyAqfmzeLRPkqAUtFxKb67i2z2ks2dxnxrq6gTLN+zYUJTy88AidT+orpLmTiWGd8zv2fJlYxDoKxNwi20G+AQUH8OZ96tvpYdSdY8wV8yNkLqbUGReEoikBCIDmKcvwh0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 678ECA1BE9; Tue, 19 Nov 2024 01:56:37 +0100 (CET) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UsE6aYGO3zqB; Tue, 19 Nov 2024 01:56:37 +0100 (CET) Received: from begin (aamiens-653-1-40-48.w83-192.abo.wanadoo.fr [83.192.199.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id C076FA1C8F; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1tDCXk-0000000CrP4-0x4i; Tue, 19 Nov 2024 01:56:36 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd, commited 11/13] htl: move pthread_attr_setschedparam into libc. Date: Tue, 19 Nov 2024 01:56:32 +0100 Message-ID: <20241119005634.3065147-12-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> References: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 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 eae1c70958..555ab9b8cd 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 \ @@ -201,6 +200,7 @@ routines := \ pt-attr-getstacksize \ pt-attr-setdetachstate \ pt-attr-setinheritsched \ + pt-attr-setschedparam \ pt-attr-setschedpolicy \ pt-attr-setscope \ pt-attr-setstack \ diff --git a/htl/Versions b/htl/Versions index 01f9f27a37..8ecb2fd880 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 105b46cfea..179ec60bc5 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 80afc5e86a..835d741215 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 39a9cdf5ed..a60952fbb3 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 1c691db6f3..17c97ef200 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 *); @@ -62,8 +60,6 @@ int _cthreads_ftrylockfile (FILE *); 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_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 1c3d33821f..8fd21e66a1 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -41,6 +41,7 @@ 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 +GLIBC_2.12 pthread_attr_setschedparam F GLIBC_2.12 pthread_attr_setschedpolicy F GLIBC_2.12 pthread_attr_setscope F GLIBC_2.12 pthread_attr_setstack F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 83e3a06dc3..ea40657e1d 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 b4f54f5f5d..eef91700e9 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 Tue Nov 19 00:56:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 101480 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 EB0663858423 for ; Tue, 19 Nov 2024 00:59:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EB0663858423 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 11BB4385841C for ; Tue, 19 Nov 2024 00:56:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 11BB4385841C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 11BB4385841C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977813; cv=none; b=o/U+5PFu9GV+sbyml7b3OrlTKCV4QMra6ocMCS7cW/Y4ENVDhk21UIFUFWc0YNWZkiQkFpzLkaFggRwA0T/uiPqdHJhd5xDmBnuL3HQREuzZknOF9+TJBhNdN3j5MdcQxRYEfiiGsa7rnPNC9yrHryhtuUTtdRw/vzx9a2X2dKM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977813; c=relaxed/simple; bh=5x/RmzMDJbfTSolYZPiH6Q/no4pqvj3MvshJHM5epIk=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=eWIINMvZrBJKmDPMMcyCgobvmVS3NNb6VrezeJDPtvEE5LkwgvSJ4EvR+6oF73qSSa2uz3irfu79eW60ugG9DFtFsUuhI3l1xBtWGBFpSYOcS/gJ91tW5zjtCFkOMFMmOub/Z+RAyoMjFOcCOE843mnPj0WM7FfgU6BZzwjeFgw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 11BB4385841C Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 83E69A1C8E; Tue, 19 Nov 2024 01:56:37 +0100 (CET) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id h1xC-BO7dIUf; Tue, 19 Nov 2024 01:56:37 +0100 (CET) Received: from begin (aamiens-653-1-40-48.w83-192.abo.wanadoo.fr [83.192.199.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id D209CA1C91; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1tDCXk-0000000CrP7-13FK; Tue, 19 Nov 2024 01:56:36 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 12/13] htl: move pthread_attr_setguardsize into libc. Date: Tue, 19 Nov 2024 01:56:33 +0100 Message-ID: <20241119005634.3065147-13-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> References: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 3 ++- 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, 14 insertions(+), 5 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 555ab9b8cd..5c625d0ca9 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 \ @@ -199,6 +198,7 @@ routines := \ pt-attr-getstackaddr \ pt-attr-getstacksize \ pt-attr-setdetachstate \ + pt-attr-setguardsize \ pt-attr-setinheritsched \ pt-attr-setschedparam \ pt-attr-setschedpolicy \ diff --git a/htl/Versions b/htl/Versions index 8ecb2fd880..3374574869 100644 --- a/htl/Versions +++ b/htl/Versions @@ -19,6 +19,7 @@ libc { pthread_attr_getstacksize; pthread_attr_getstackaddr; pthread_attr_getstack; + pthread_attr_setguardsize; pthread_attr_setstacksize; pthread_attr_setstackaddr; pthread_attr_setstack; @@ -61,6 +62,7 @@ libc { pthread_attr_setstacksize; pthread_attr_setstackaddr; pthread_attr_setstack; + pthread_attr_setguardsize; } @@ -107,7 +109,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 50a9a9a7a6..92cd2b58f2 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 8fd21e66a1..0672f31a69 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_setschedparam F GLIBC_2.12 pthread_attr_setschedpolicy F @@ -2497,6 +2498,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 ea40657e1d..86d79bbc35 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 f4f65ca353..f147fcb5c2 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1523,6 +1523,7 @@ 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 +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 eef91700e9..9e156b16bf 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 Tue Nov 19 00:56:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 101485 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 7AF233858CD9 for ; Tue, 19 Nov 2024 01:01:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7AF233858CD9 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 1508A385840E for ; Tue, 19 Nov 2024 00:56:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1508A385840E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1508A385840E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977814; cv=none; b=nBQo1xWThTHjMWN6S6uLj6WOu4+5iuxWubZCul57gzTdWTawbmhUrQTxnjZ/qcc/UxEEKXx3pDFo6UJrfHY4bzU57exmFPLYUf5lz7ZwHaA1TN3tbyDf4N+F4B2RGYwo+uFK7ngI6RkRCTHyC/vZO9x+u/bKIKCkpkq2aRbZWRc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977814; c=relaxed/simple; bh=47CqQpk5Cy0zQwqSF9fI3G66all1IwQ8oOdSraR38As=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=U6oNHrwy5g5yVA/c9GSSWYSAraOKyiQ9+ixFxFSMSF2JDmRB9m7kVJUrOfunbbf/Y+jnIpnzRmv2c2T3z3RVTfrsvazemjvBVXdm++ZmVh0D1OR4GwveYW9+ZdxtcJ4ADejwIernKxjsegXbbJ2WwIwzDD9QrniMXVhLQ1yp2Ho= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 84E8AA1C8F; Tue, 19 Nov 2024 01:56:37 +0100 (CET) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NhepNsMb3pTf; Tue, 19 Nov 2024 01:56:37 +0100 (CET) Received: from begin (aamiens-653-1-40-48.w83-192.abo.wanadoo.fr [83.192.199.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id C550DA1C90; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1tDCXk-0000000CrPB-19MP; Tue, 19 Nov 2024 01:56:36 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 13/13] htl: move pthread_attr_init into libc. Date: Tue, 19 Nov 2024 01:56:34 +0100 Message-ID: <20241119005634.3065147-14-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> References: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 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 | 1 + sysdeps/mach/hurd/i386/libpthread.abilist | 1 - sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 - 10 files changed, 13 insertions(+), 11 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 5c625d0ca9..25eb791031 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 \ @@ -197,6 +196,7 @@ routines := \ pt-attr-getstack \ pt-attr-getstackaddr \ pt-attr-getstacksize \ + pt-attr-init \ pt-attr-setdetachstate \ pt-attr-setguardsize \ pt-attr-setinheritsched \ diff --git a/htl/Versions b/htl/Versions index 3374574869..afc2495e2f 100644 --- a/htl/Versions +++ b/htl/Versions @@ -25,6 +25,7 @@ libc { pthread_attr_setstack; pthread_attr_setscope; pthread_attr_setschedparam; + pthread_attr_init; } GLIBC_2.21 { @@ -74,6 +75,7 @@ libc { ___pthread_self; __pthread_init_thread; __pthread_default_attr; + __pthread_attr_init; __pthread_attr_getstacksize; __pthread_attr_getstackaddr; __pthread_attr_getstack; @@ -108,8 +110,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 179ec60bc5..7c0e16dc6e 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 835d741215..b082a13b54 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 b01eb9ea62..959df0cb2a 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 17c97ef200..d380d17bc6 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 *); @@ -59,7 +58,6 @@ int _cthreads_ftrylockfile (FILE *); so if possible avoid breaking it and append new hooks to the end. */ struct pthread_functions { - 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 6f6f6dffc7..68e6cf17b0 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -97,10 +97,12 @@ libc_hidden_proto (__pthread_attr_setstack) int __pthread_attr_getstack (const pthread_attr_t *, void **, size_t *); libc_hidden_proto (__pthread_attr_getstack) 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 0672f31a69..101d5b8025 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -39,6 +39,7 @@ 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_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 86d79bbc35..4e287c2e31 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 9e156b16bf..3396ea9e70 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