From patchwork Tue Nov 26 20:53:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 101925 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 35DB83858C3A for ; Tue, 26 Nov 2024 20:59:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 35DB83858C3A Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=disroot.org header.i=@disroot.org header.a=rsa-sha256 header.s=mail header.b=d1qFfCXs X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) by sourceware.org (Postfix) with ESMTPS id 92A093858D37 for ; Tue, 26 Nov 2024 20:57:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 92A093858D37 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=disroot.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 92A093858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1732654643; cv=none; b=JwnHD1sRVzLJ806pvZUoNIVevZcLX45kgn63rEz38VZwHpzvGKrxWl4P+xrw73kSkBlHFx89FdM6JWU8qUVR29FIPawLHXTfVJECz/0HT2erOEKhLERIh5nap5/b4Gm5mKhysjg+p5uncxyAJPmrRcTK16XRdEu8uqlxcVeHAzA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1732654643; c=relaxed/simple; bh=GCRaegaxlwn5Oq92qWBF2ft2qfc/OKPU4sWcNAOJWwc=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=uZuI3iSlc8U8PciNsdzLS+pAE1wp2XJUWAW327k1F3cOAH7KiJ0M4vLcLOmKWM8s5g3DDC6EEqj23z+Og/2fWLOOoKu0JmZ+5ryj849lu4LBMsYIzImj893P585rg+zELY3G/W4HaL+3z5WkVua4waUEi/NDKGdviK0atTwAbKI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 92A093858D37 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id E2C2824D68; Tue, 26 Nov 2024 21:57:21 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 5pXyJBkphSfk; Tue, 26 Nov 2024 21:57:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1732654637; bh=GCRaegaxlwn5Oq92qWBF2ft2qfc/OKPU4sWcNAOJWwc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=d1qFfCXsh1uY0TKkF4fmuON+bNK6u+cv8OxgBLw9lZdbvCJGrywrgXIgIKioXsZjH chTjE8mKk1xkG3NCGmoIPWdou8JYwxAuZ9evpDbnHO3qg9hq7oSFAivzd6QPvxLTq5 RBgwnNtmvcAb+oewz02efS5neah70VI5KxU6pnwogldQeL3CBXNSYuMl4suXNgDgqb ZW3gDNsLnRUbHh6erGDR95986Gbo+1mWVF9sPPaeSGsWQ4jtqy9GDQDS6mUuieGjvP EQfxPmUxYSD8YNG+V3rSQO/xba+lQGrR5+ejD30HW9Z1Bmicf28XpWky7M+NmgUPn5 0rah3v5CF9oyg== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 1/7] htl: move pthread_condattr_destroy into libc. Date: Tue, 26 Nov 2024 22:53:23 +0200 Message-Id: <20241126205329.2215295-2-gfleury@disroot.org> In-Reply-To: <20241126205329.2215295-1-gfleury@disroot.org> References: <20241126205329.2215295-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 3 ++- htl/forward.c | 1 - htl/pt-initialize.c | 1 - sysdeps/htl/pt-condattr-destroy.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(+), 9 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 25eb7910..2658f247 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -94,7 +94,6 @@ libpthread-routines := \ pt-rwlock-unlock \ pt-cond \ pt-condattr-init \ - pt-condattr-destroy \ pt-condattr-getclock \ pt-condattr-getpshared \ pt-condattr-setclock \ @@ -206,6 +205,7 @@ routines := \ pt-attr-setstack \ pt-attr-setstackaddr \ pt-attr-setstacksize \ + pt-condattr-destroy \ pt-getschedparam \ pt-nthreads \ pt-pthread_self \ diff --git a/htl/Versions b/htl/Versions index afc2495e..12399ba1 100644 --- a/htl/Versions +++ b/htl/Versions @@ -26,6 +26,7 @@ libc { pthread_attr_setscope; pthread_attr_setschedparam; pthread_attr_init; + pthread_condattr_destroy; } GLIBC_2.21 { @@ -119,7 +120,7 @@ libpthread { pthread_cond_broadcast; pthread_cond_destroy; pthread_cond_init; pthread_cond_signal; pthread_cond_timedwait; pthread_cond_wait; - pthread_condattr_destroy; pthread_condattr_getclock; + pthread_condattr_getclock; pthread_condattr_getpshared; pthread_condattr_init; pthread_condattr_setclock; pthread_condattr_setpshared; diff --git a/htl/forward.c b/htl/forward.c index 7c0e16dc..3fe0a74d 100644 --- a/htl/forward.c +++ b/htl/forward.c @@ -53,7 +53,6 @@ name decl \ #define FORWARD(name, decl, params, defretval) \ FORWARD2 (name, int, decl, params, return defretval) -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 b082a13b..632ee847 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_condattr_destroy = __pthread_condattr_destroy, .ptr_pthread_condattr_init = __pthread_condattr_init, .ptr_pthread_cond_broadcast = __pthread_cond_broadcast, .ptr_pthread_cond_destroy = __pthread_cond_destroy, diff --git a/sysdeps/htl/pt-condattr-destroy.c b/sysdeps/htl/pt-condattr-destroy.c index dc6a667a..ec7ee524 100644 --- a/sysdeps/htl/pt-condattr-destroy.c +++ b/sysdeps/htl/pt-condattr-destroy.c @@ -17,6 +17,7 @@ . */ #include +#include #include int @@ -24,5 +25,8 @@ __pthread_condattr_destroy (pthread_condattr_t *cond) { return 0; } +versioned_symbol (libc, __pthread_condattr_destroy, pthread_condattr_destroy, GLIBC_2_21); -weak_alias (__pthread_condattr_destroy, pthread_condattr_destroy); +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21) +compat_symbol (libc, __pthread_condattr_destroy, pthread_condattr_destroy, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthread-functions.h b/sysdeps/htl/pthread-functions.h index d380d17b..6bd01682 100644 --- a/sysdeps/htl/pthread-functions.h +++ b/sysdeps/htl/pthread-functions.h @@ -21,7 +21,6 @@ #include -int __pthread_condattr_destroy (pthread_condattr_t *); int __pthread_condattr_init (pthread_condattr_t *); int __pthread_cond_broadcast (pthread_cond_t *); int __pthread_cond_destroy (pthread_cond_t *); @@ -58,7 +57,6 @@ int _cthreads_ftrylockfile (FILE *); so if possible avoid breaking it and append new hooks to the end. */ struct pthread_functions { - int (*ptr_pthread_condattr_destroy) (pthread_condattr_t *); int (*ptr_pthread_condattr_init) (pthread_condattr_t *); int (*ptr_pthread_cond_broadcast) (pthread_cond_t *); int (*ptr_pthread_cond_destroy) (pthread_cond_t *); diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 101d5b80..5069319b 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -49,6 +49,7 @@ 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_condattr_destroy F GLIBC_2.12 pthread_equal F GLIBC_2.12 pthread_getschedparam F GLIBC_2.12 pthread_self F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 4e287c2e..7000b009 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -36,7 +36,6 @@ GLIBC_2.12 pthread_cond_init F GLIBC_2.12 pthread_cond_signal F GLIBC_2.12 pthread_cond_timedwait F GLIBC_2.12 pthread_cond_wait F -GLIBC_2.12 pthread_condattr_destroy F GLIBC_2.12 pthread_condattr_getclock F GLIBC_2.12 pthread_condattr_getpshared F GLIBC_2.12 pthread_condattr_init F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index 3396ea9e..91da5612 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -55,7 +55,6 @@ GLIBC_2.38 pthread_cond_init F GLIBC_2.38 pthread_cond_signal F GLIBC_2.38 pthread_cond_timedwait F GLIBC_2.38 pthread_cond_wait F -GLIBC_2.38 pthread_condattr_destroy F GLIBC_2.38 pthread_condattr_getclock F GLIBC_2.38 pthread_condattr_getpshared F GLIBC_2.38 pthread_condattr_init F