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