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 From patchwork Tue Nov 26 20:53:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 101930 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 4BCC13858031 for ; Tue, 26 Nov 2024 21:03:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4BCC13858031 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=P0m3B8IN 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 93BC13858C50 for ; Tue, 26 Nov 2024 20:57:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 93BC13858C50 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 93BC13858C50 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=1732654644; cv=none; b=J49tardy5DBs/MOSc0TpatG+9uyopPrQFIiBCT19DbnDRpAJRyLmakTIxKKFNpvqf/L7tupKJT6ZMZdSzt8iyi4m909GlrvwNyicVNPsb7iesgpS0Elwmpkn69PgOm2btWUpZ4dmQAC0OESJ8/+6RWYsi+3Vo8myv5b7ZGHL3rg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1732654644; c=relaxed/simple; bh=wW4zYrsiZ1ml9E6nEPFjBUHeHMyN/AHwFUV3JAtATa0=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=rFHLF6g4ba6WDJhfN6l8l99//45PUEwviaiTMAzFkTzhLvLKfAtXWwzv7COpDGghpicpjniGh8jkOmvzjHKAYWDYnoFLnc3O9FzVuD0FT3C05N1LSHvnZyAuLw0oO/ucnGoOBMOZhkwbI8FHCSXQidH1hd/QC8XutiYJd6qo8Sc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 93BC13858C50 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 56A1F24F45; Tue, 26 Nov 2024 21:57:23 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id R5-eSgVeFoPX; Tue, 26 Nov 2024 21:57:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1732654639; bh=wW4zYrsiZ1ml9E6nEPFjBUHeHMyN/AHwFUV3JAtATa0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=P0m3B8INk+B0v2EDaTMUGueQzG2G+gcJ2YOdtMOHRzSSatc++NRo5RehoW945rPca JE++xLnQojfO/pTjXlweg9/76IiVsNGRh29RtTgk4l7YrWF7Jt9BptIyJ///xt8kDC a9CPBHfg4WBRsQ0/pJHlpc6at6sqv8sEi9oxy29QN57198DMDXvf/S+Y1OQ48axcou aFaw+KvSibBTxR3t9tetTdFG1xrVzKo8ETE53+HWP0eUILtfQsyVMvDPu0ZA5WdZ6f sCso9Pbdi+/PQp3ANR55xXqrf2C9EyGjsvTuIubZclggk31uyIGrYbRUskWi+RhVLS IvPaI7l/uN1UQ== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 2/7] htl: move __pthread_default_condattr into libc. Date: Tue, 26 Nov 2024 22:53:24 +0200 Message-Id: <20241126205329.2215295-3-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, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 1 + htl/pt-internal.h | 1 + sysdeps/htl/pt-cond.c | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/htl/Makefile b/htl/Makefile index 2658f247..5f9b2ba2 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -92,7 +92,6 @@ libpthread-routines := \ pt-rwlock-timedrdlock \ pt-rwlock-timedwrlock \ pt-rwlock-unlock \ - pt-cond \ pt-condattr-init \ pt-condattr-getclock \ pt-condattr-getpshared \ @@ -205,6 +204,7 @@ routines := \ pt-attr-setstack \ pt-attr-setstackaddr \ pt-attr-setstacksize \ + pt-cond \ pt-condattr-destroy \ pt-getschedparam \ pt-nthreads \ diff --git a/htl/Versions b/htl/Versions index 12399ba1..7aa8a1fe 100644 --- a/htl/Versions +++ b/htl/Versions @@ -83,6 +83,7 @@ libc { __pthread_attr_setstacksize; __pthread_attr_setstackaddr; __pthread_attr_setstack; + __pthread_default_condattr; } } diff --git a/htl/pt-internal.h b/htl/pt-internal.h index bdc8b83d..23fdb73f 100644 --- a/htl/pt-internal.h +++ b/htl/pt-internal.h @@ -329,6 +329,7 @@ extern const struct __pthread_rwlockattr __pthread_default_rwlockattr; /* Default condition attributes. */ extern const struct __pthread_condattr __pthread_default_condattr; +libc_hidden_proto (__pthread_default_condattr) /* Semaphore encoding. See nptl implementation for the details. */ diff --git a/sysdeps/htl/pt-cond.c b/sysdeps/htl/pt-cond.c index 5c66c22c..42b18121 100644 --- a/sysdeps/htl/pt-cond.c +++ b/sysdeps/htl/pt-cond.c @@ -25,3 +25,4 @@ const struct __pthread_condattr __pthread_default_condattr = { __pshared: PTHREAD_PROCESS_PRIVATE, __clock: CLOCK_REALTIME }; +libc_hidden_data_def (__pthread_default_condattr) From patchwork Tue Nov 26 20:53:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 101929 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 5ABBA3858C50 for ; Tue, 26 Nov 2024 21:01:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5ABBA3858C50 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=hFOVerlp 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 AECEB3858C32 for ; Tue, 26 Nov 2024 20:57:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AECEB3858C32 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 AECEB3858C32 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=1732654646; cv=none; b=R+7umIukX8ypZ7OAMzpMGvb4taVWodWa9rZDqZ3Iu8XuWsvT0ABzpyqKTXqEUeoVxcPdDalo7u9fZFZ7aRY08cpJBwnAih1xlHtvJ6vZ/hMb44e31Z3KHT/K88PX2o40GAxivbqIZv3LxFBhhHRV0HPsO3saUL8qQ9DrJPB+hUo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1732654646; c=relaxed/simple; bh=MBTirRqvgCQtjAnqQ/qKfccH7/kiJ51ZkEIaiDkXim8=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=W5e3JtRfcDgSuqE0sWjTLaqNN+fkBJ3DfSDLbdDwKI/X9tLwBr0KEnEKwPkZnt58l3Tj97IMb4XaJww0fhDwY/3a/HNc2I0wDRmNQPnhq66nqbwHsEv6JjRL/FG6+9y6l79tqvf5GOJyLtlv4n93yqDcQiyRSTqp0EgExQfryZc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AECEB3858C32 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 2490524F00; Tue, 26 Nov 2024 21:57:25 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id tzFnJYFLIbVa; Tue, 26 Nov 2024 21:57:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1732654640; bh=MBTirRqvgCQtjAnqQ/qKfccH7/kiJ51ZkEIaiDkXim8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=hFOVerlpn8kEL54MZ4ZQeVZNK0FOi6+sIAE2aj9LCZIJqq6dpctzFrmB5GVQX4Qsm UuhBj7ofAs6SXLiuIlXEgI2NLwgMeEoYQOsazWxD/98xUjF0fiattsVfXQ2dEDJRpe Hakp5LcASxeaao0O7fLQRhCTirwqEGQDD6hWYWt7ESxfRnrZal1/OoCH2Ao0xpmzQX gFcwIfuqwWaGnYBoYtGhPBXnzh1VyWZLvGhbi8/brwgjmwhIFJyN4w7By7aXoK8Lap FmeMzBDaMDOKd/HgH/1iMLCnzrZ760E/fjeag2nZ5bOS9FS1SsBcGaClnSTQ3dLUzk Mso/VACwAglVg== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 3/7] htl: move pthread_condattr_getclock into libc. Date: Tue, 26 Nov 2024 22:53:25 +0200 Message-Id: <20241126205329.2215295-4-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 ++- sysdeps/htl/pt-condattr-getclock.c | 9 +++++++-- sysdeps/mach/hurd/i386/libc.abilist | 2 ++ sysdeps/mach/hurd/i386/libpthread.abilist | 1 - sysdeps/mach/hurd/x86_64/libc.abilist | 2 ++ sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 - 7 files changed, 14 insertions(+), 6 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 5f9b2ba2..ef01902c 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -93,7 +93,6 @@ libpthread-routines := \ pt-rwlock-timedwrlock \ pt-rwlock-unlock \ pt-condattr-init \ - pt-condattr-getclock \ pt-condattr-getpshared \ pt-condattr-setclock \ pt-condattr-setpshared \ @@ -206,6 +205,7 @@ routines := \ pt-attr-setstacksize \ pt-cond \ pt-condattr-destroy \ + pt-condattr-getclock \ pt-getschedparam \ pt-nthreads \ pt-pthread_self \ diff --git a/htl/Versions b/htl/Versions index 7aa8a1fe..887703ef 100644 --- a/htl/Versions +++ b/htl/Versions @@ -26,6 +26,7 @@ libc { pthread_attr_setscope; pthread_attr_setschedparam; pthread_attr_init; + pthread_condattr_getclock; pthread_condattr_destroy; } @@ -65,6 +66,7 @@ libc { pthread_attr_setstackaddr; pthread_attr_setstack; pthread_attr_setguardsize; + pthread_condattr_getclock; } @@ -121,7 +123,6 @@ libpthread { pthread_cond_broadcast; pthread_cond_destroy; pthread_cond_init; pthread_cond_signal; pthread_cond_timedwait; pthread_cond_wait; - pthread_condattr_getclock; pthread_condattr_getpshared; pthread_condattr_init; pthread_condattr_setclock; pthread_condattr_setpshared; diff --git a/sysdeps/htl/pt-condattr-getclock.c b/sysdeps/htl/pt-condattr-getclock.c index a1ac71b0..e3c6cb96 100644 --- a/sysdeps/htl/pt-condattr-getclock.c +++ b/sysdeps/htl/pt-condattr-getclock.c @@ -17,13 +17,18 @@ . */ #include +#include #include - #include int -pthread_condattr_getclock (const pthread_condattr_t *attr, clockid_t * clock) +__pthread_condattr_getclock (const pthread_condattr_t *attr, clockid_t * clock) { *clock = attr->__clock; return 0; } +versioned_symbol (libpthread, __pthread_condattr_getclock, pthread_condattr_getclock, GLIBC_2_41); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41) +compat_symbol (libpthread, __pthread_condattr_getclock, pthread_condattr_getclock, GLIBC_2_12); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 5069319b..72c09131 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -50,6 +50,7 @@ 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_condattr_getclock F GLIBC_2.12 pthread_equal F GLIBC_2.12 pthread_getschedparam F GLIBC_2.12 pthread_self F @@ -2504,6 +2505,7 @@ 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 +GLIBC_2.41 pthread_condattr_getclock 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 7000b009..819e74ab 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_getclock F GLIBC_2.12 pthread_condattr_getpshared F GLIBC_2.12 pthread_condattr_init F GLIBC_2.12 pthread_condattr_setclock F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index f147fcb5..c070d6c4 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1538,6 +1538,7 @@ 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_init F GLIBC_2.38 pthread_equal F GLIBC_2.38 pthread_exit F @@ -2200,6 +2201,7 @@ 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 +GLIBC_2.41 pthread_condattr_getclock 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 91da5612..6397cd5f 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_getclock F GLIBC_2.38 pthread_condattr_getpshared F GLIBC_2.38 pthread_condattr_init F GLIBC_2.38 pthread_condattr_setclock F From patchwork Tue Nov 26 20:53:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 101926 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 B4E423858D37 for ; Tue, 26 Nov 2024 20:59:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B4E423858D37 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=hR5wpciD 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 8A0EC3858CDA for ; Tue, 26 Nov 2024 20:57:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8A0EC3858CDA 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 8A0EC3858CDA 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=1732654644; cv=none; b=w6tXTc4Gy+DFgfO1lhDSu5jrF1XDRYk7RMqJLeYaUgEycWZbSssVrrw00lRVnK7yC5OcM5ypR7GGDF/sB27hCBS7Eb7/We96TQ80tcFbCo5OrguCtajx0ImqpVQ8x63OR6CViIj9DPvtGy3QJI0BkbW7vryFnZkFeJgdey6aYNQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1732654644; c=relaxed/simple; bh=HQ1J0zxlZm/gCs9KWx/tNYqNBNUoMHt3Zi1jOZdbl3g=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=LkT8SYlz3NfjiV+3QEeQ+jsDg81zhcyvTmj8TmzvRbABDgqXrRKdjakXpQWUMziU0YPwLrxaUZt5F5zsgxkDLdaiZZY2qheveOj7DPRgjS5fOO3DysOlhi/zLRq3q4NeFwEPpLoIL7rhov2Jfdw844j8hB8IpdUFUf9+HU/U88Q= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8A0EC3858CDA Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 7851124EDF; Tue, 26 Nov 2024 21:57:23 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id FK6YtxMu72ng; Tue, 26 Nov 2024 21:57:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1732654642; bh=HQ1J0zxlZm/gCs9KWx/tNYqNBNUoMHt3Zi1jOZdbl3g=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=hR5wpciDRrBZcXMcfOPAi3JfQYf0Xja68qBmM0kbkGal+uESlT/bxsDCYrJbXupH6 hKRBQMp7cVa98HBw53PfMRgdmFO3kvHRtPat6quhnamhX1YhAomhLI8+bN1BHu107y F64PbUg1u7meIsJNhvtgc8nuw7Q+P5Kk0qQAsa9eZhH3rp4WaMRLR0FEtjTCE0K8yz 78g1zDmiQCeqUL2J1kytyzq1H1czcEfrC3Zv0zxUrdwi3gcPoe21dc2hFkwlvudP5e 7g+hQmf4zhlmtoX2RRB0FM/adIJviTG1sEHe52DU/orZbxmXdvZyQrCcTjxl8N3XDq 60u8pnm6tv1gQ== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 4/7] htl: move pthread_condattr_getpshared into libc. Date: Tue, 26 Nov 2024 22:53:26 +0200 Message-Id: <20241126205329.2215295-5-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 | 4 +++- sysdeps/htl/pt-condattr-getpshared.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, 15 insertions(+), 5 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index ef01902c..60a28e0c 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -93,7 +93,6 @@ libpthread-routines := \ pt-rwlock-timedwrlock \ pt-rwlock-unlock \ pt-condattr-init \ - pt-condattr-getpshared \ pt-condattr-setclock \ pt-condattr-setpshared \ pt-cond-destroy \ @@ -206,6 +205,7 @@ routines := \ pt-cond \ pt-condattr-destroy \ pt-condattr-getclock \ + pt-condattr-getpshared \ pt-getschedparam \ pt-nthreads \ pt-pthread_self \ diff --git a/htl/Versions b/htl/Versions index 887703ef..33106014 100644 --- a/htl/Versions +++ b/htl/Versions @@ -28,6 +28,7 @@ libc { pthread_attr_init; pthread_condattr_getclock; pthread_condattr_destroy; + pthread_condattr_getpshared; } GLIBC_2.21 { @@ -67,6 +68,7 @@ libc { pthread_attr_setstack; pthread_attr_setguardsize; pthread_condattr_getclock; + pthread_condattr_getpshared; } @@ -123,7 +125,7 @@ libpthread { pthread_cond_broadcast; pthread_cond_destroy; pthread_cond_init; pthread_cond_signal; pthread_cond_timedwait; pthread_cond_wait; - pthread_condattr_getpshared; pthread_condattr_init; + pthread_condattr_init; pthread_condattr_setclock; pthread_condattr_setpshared; pthread_create; pthread_detach; pthread_exit; diff --git a/sysdeps/htl/pt-condattr-getpshared.c b/sysdeps/htl/pt-condattr-getpshared.c index 7aea9e6e..90e9c488 100644 --- a/sysdeps/htl/pt-condattr-getpshared.c +++ b/sysdeps/htl/pt-condattr-getpshared.c @@ -17,11 +17,17 @@ . */ #include +#include #include int -pthread_condattr_getpshared (const pthread_condattr_t *attr, int *pshared) +__pthread_condattr_getpshared (const pthread_condattr_t *attr, int *pshared) { *pshared = attr->__pshared; return 0; } +versioned_symbol (libpthread, __pthread_condattr_getpshared, pthread_condattr_getpshared, GLIBC_2_41); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41) +compat_symbol (libpthread, __pthread_condattr_getpshared, pthread_condattr_getpshared, GLIBC_2_12); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 72c09131..de6db602 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -51,6 +51,7 @@ 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_condattr_getclock F +GLIBC_2.12 pthread_condattr_getpshared F GLIBC_2.12 pthread_equal F GLIBC_2.12 pthread_getschedparam F GLIBC_2.12 pthread_self F @@ -2506,6 +2507,7 @@ GLIBC_2.41 pthread_attr_setstack F GLIBC_2.41 pthread_attr_setstackaddr F GLIBC_2.41 pthread_attr_setstacksize F GLIBC_2.41 pthread_condattr_getclock F +GLIBC_2.41 pthread_condattr_getpshared 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 819e74ab..6a1e221e 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_getpshared F GLIBC_2.12 pthread_condattr_init F GLIBC_2.12 pthread_condattr_setclock F GLIBC_2.12 pthread_condattr_setpshared F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index c070d6c4..9a549053 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1539,6 +1539,7 @@ 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 GLIBC_2.38 pthread_equal F GLIBC_2.38 pthread_exit F @@ -2202,6 +2203,7 @@ GLIBC_2.41 pthread_attr_setstack F GLIBC_2.41 pthread_attr_setstackaddr F GLIBC_2.41 pthread_attr_setstacksize F GLIBC_2.41 pthread_condattr_getclock F +GLIBC_2.41 pthread_condattr_getpshared 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 6397cd5f..ae4480ca 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_getpshared F GLIBC_2.38 pthread_condattr_init F GLIBC_2.38 pthread_condattr_setclock F GLIBC_2.38 pthread_condattr_setpshared F From patchwork Tue Nov 26 20:53:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 101928 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 9AACA3858435 for ; Tue, 26 Nov 2024 21:00:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9AACA3858435 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=Dyje0Hx4 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 61C5D3858432 for ; Tue, 26 Nov 2024 20:57:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 61C5D3858432 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 61C5D3858432 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=1732654651; cv=none; b=CS/TdDj5C/RKEEnRrzlY2J5RQDvaM1WtIZDn2Vc+5Hg2q0YWzsuRgpEJiSFV/lRS2Vf2GdEJdwsOEZOiaoZWpYoqwu1oRNzKedBWEk9qZNHGgFCUn/YGtv20DOlsKk4nUdiWVoeLeQ4p8Xq91XiwbtHrmKIHXMX3ZR9z+Ycirik= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1732654651; c=relaxed/simple; bh=STaORpTtkUEbeOikSh7D5dUcE1Hx7msnYB915DYPKvs=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=J9ETcX8Lvp7mho8aWfxnoxH8kufnjTVtvoGdhU/b6rAxQ59kK4ZsXu90TswBLZXJI5JQEhbRMUcRiud/r2Qo1BwHrFkJMJMw5qj8i+s877xTAd4aB2uaed3qPBwHpLrWprinFCal6cigb0E+8Bsqo9zk0e+Riifc5iulnpuZ034= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 61C5D3858432 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 7516D24F39; Tue, 26 Nov 2024 21:57:28 +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 CbCWJvrW3Gly; Tue, 26 Nov 2024 21:57:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1732654644; bh=STaORpTtkUEbeOikSh7D5dUcE1Hx7msnYB915DYPKvs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Dyje0Hx4XjWO+herlHjaoUJMuQjuJX9akOKlRJZIIXgiTO6upPBpjXGP/z2d3QKqa cHF6UxXDZ1/053tqLrhq6ogydTIIuNRe3LshHvrJzRKjJ59YUUeAcNBwED/Bg3eine QYzkJdRytmWk5Usbl0oHi9i6WXSVmeO4YjqOFg+Ctq2geQixxkVrws1XhVUL9v9tWc d+WMn37G7/QhE0mkC+9AE8gxLM3twks1ScHo2IV8Nf74JcDWbWH24q5CScPVjnZ27R G8tOk09E9Z4JX9uPMw2PYakiGWu0lToKV5MfEueN/qYPNygRAoj0d9M60WJyP08l/D KKJM8GoK2laqg== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 5/7] htl: move pthread_condattr_init into libc. Date: Tue, 26 Nov 2024 22:53:27 +0200 Message-Id: <20241126205329.2215295-6-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.8 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 | 3 --- htl/pt-initialize.c | 1 - sysdeps/htl/pt-condattr-init.c | 7 ++++++- 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, 12 insertions(+), 11 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 60a28e0c..e68cf2b5 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -92,7 +92,6 @@ libpthread-routines := \ pt-rwlock-timedrdlock \ pt-rwlock-timedwrlock \ pt-rwlock-unlock \ - pt-condattr-init \ pt-condattr-setclock \ pt-condattr-setpshared \ pt-cond-destroy \ @@ -206,6 +205,7 @@ routines := \ pt-condattr-destroy \ pt-condattr-getclock \ pt-condattr-getpshared \ + pt-condattr-init \ pt-getschedparam \ pt-nthreads \ pt-pthread_self \ diff --git a/htl/Versions b/htl/Versions index 33106014..95c8a521 100644 --- a/htl/Versions +++ b/htl/Versions @@ -27,6 +27,7 @@ libc { pthread_attr_setschedparam; pthread_attr_init; pthread_condattr_getclock; + pthread_condattr_init; pthread_condattr_destroy; pthread_condattr_getpshared; } @@ -87,6 +88,7 @@ libc { __pthread_attr_setstacksize; __pthread_attr_setstackaddr; __pthread_attr_setstack; + __pthread_condattr_init; __pthread_default_condattr; } } @@ -125,7 +127,6 @@ libpthread { pthread_cond_broadcast; pthread_cond_destroy; pthread_cond_init; pthread_cond_signal; pthread_cond_timedwait; pthread_cond_wait; - pthread_condattr_init; pthread_condattr_setclock; pthread_condattr_setpshared; pthread_create; pthread_detach; pthread_exit; diff --git a/htl/forward.c b/htl/forward.c index 3fe0a74d..48825de0 100644 --- a/htl/forward.c +++ b/htl/forward.c @@ -53,9 +53,6 @@ name decl \ #define FORWARD(name, decl, params, defretval) \ FORWARD2 (name, int, decl, params, return defretval) -FORWARD (pthread_condattr_init, (pthread_condattr_t *attr), (attr), 0) - - FORWARD (pthread_cond_broadcast, (pthread_cond_t *cond), (cond), 0) FORWARD (pthread_cond_destroy, (pthread_cond_t *cond), (cond), 0) FORWARD (pthread_cond_init, diff --git a/htl/pt-initialize.c b/htl/pt-initialize.c index 632ee847..ae721f3a 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_init = __pthread_condattr_init, .ptr_pthread_cond_broadcast = __pthread_cond_broadcast, .ptr_pthread_cond_destroy = __pthread_cond_destroy, .ptr_pthread_cond_init = __pthread_cond_init, diff --git a/sysdeps/htl/pt-condattr-init.c b/sysdeps/htl/pt-condattr-init.c index 4f7486a2..7ffa1622 100644 --- a/sysdeps/htl/pt-condattr-init.c +++ b/sysdeps/htl/pt-condattr-init.c @@ -17,6 +17,7 @@ . */ #include +#include #include int @@ -27,5 +28,9 @@ __pthread_condattr_init (pthread_condattr_t *attr) *attr = __pthread_default_condattr; return 0; } +libc_hidden_def (__pthread_condattr_init) +versioned_symbol (libc, __pthread_condattr_init, pthread_condattr_init, GLIBC_2_21); -weak_alias (__pthread_condattr_init, pthread_condattr_init); +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21) +compat_symbol (libc, __pthread_condattr_init, pthread_condattr_init, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthread-functions.h b/sysdeps/htl/pthread-functions.h index 6bd01682..8ee01d3f 100644 --- a/sysdeps/htl/pthread-functions.h +++ b/sysdeps/htl/pthread-functions.h @@ -21,7 +21,6 @@ #include -int __pthread_condattr_init (pthread_condattr_t *); int __pthread_cond_broadcast (pthread_cond_t *); int __pthread_cond_destroy (pthread_cond_t *); int __pthread_cond_init (pthread_cond_t *, @@ -57,7 +56,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_init) (pthread_condattr_t *); int (*ptr_pthread_cond_broadcast) (pthread_cond_t *); int (*ptr_pthread_cond_destroy) (pthread_cond_t *); int (*ptr_pthread_cond_init) (pthread_cond_t *, diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 68e6cf17..afdf2cbd 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -98,11 +98,13 @@ 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); +int __pthread_condattr_init (pthread_condattr_t *attr); #define __pthread_raise_internal(__sig) raise (__sig) libc_hidden_proto (__pthread_self) libc_hidden_proto (__pthread_attr_init) +libc_hidden_proto (__pthread_condattr_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 de6db602..1e3e6489 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -52,6 +52,7 @@ GLIBC_2.12 pthread_attr_setstacksize 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 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 6a1e221e..6bacf9a4 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_init F GLIBC_2.12 pthread_condattr_setclock F GLIBC_2.12 pthread_condattr_setpshared F GLIBC_2.12 pthread_create F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index ae4480ca..35ff3d03 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_init F GLIBC_2.38 pthread_condattr_setclock F GLIBC_2.38 pthread_condattr_setpshared F GLIBC_2.38 pthread_create F From patchwork Tue Nov 26 20:53:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 101927 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 205353858019 for ; Tue, 26 Nov 2024 20:59:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 205353858019 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=e1/LSVop 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 993D93858C52 for ; Tue, 26 Nov 2024 20:57:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 993D93858C52 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 993D93858C52 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=1732654647; cv=none; b=c07u7PXfPynq5B60a9F2rf7wAV9v3usm9DPifN7pdkbtFpOiHBIcLRLNWrwIYk3ONQyE4VWGd3iFCU4wxBGvSEAFXg4Byr6ooWQKf49UA1TFbSnmAQw2MrleRRcbTVy4NrTNJjdz37E2jzAVDLYfDPmll8Ph+fsMiEWMeVDBom0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1732654647; c=relaxed/simple; bh=LUf1tYf1v968MNywpTmb6uR6g6/upQZFN7jX+ZZQ2CI=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=OEwRfvOXcS9idjX4oQzKSc1nJiiUHQQYN0sDPLLan20ZQCtKlhMcMb5YZy/5GgAcDQGdfjuSQgDgYsY509aWYP5Y8WqFZoxqTNGgEU1vH9Yudrat61W2IxmIPlPt0wTO8SPcp0Bz+5QJqfpqek5rurnD/n7HNsEUTfa58cAdU9A= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 993D93858C52 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 781C424F0B; Tue, 26 Nov 2024 21:57:26 +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 uLPlgIlmQX1v; Tue, 26 Nov 2024 21:57:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1732654645; bh=LUf1tYf1v968MNywpTmb6uR6g6/upQZFN7jX+ZZQ2CI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=e1/LSVopHPxCCsTEAi5+8TZKBhJRDiQ8ZvmwOUA3ZZbIPLFAyMwYJ93izFX9nnyo2 E95Lc/mAcZkpQ8MMp8wl9ACNGhE29dr6bQjGiGNdUQT5cleddegOPlqFzaOAnsAash 9R/o+FE3XZ7qgLIzhvwX7kBIDvrZCYS3KU12yWw9MiJliEPCZIq5hrMyXcLW0WX3Mk 1Noxn0fpsUpbnMBF8yFUZ2nBK+zCtnElwLks4aCDrjMf+54B3mR4gEsqxiHDjgC9br WIbVlwo8/g3Yi42q/5/g8aQkdBhPMCoYqfx3RCdGDHlBn/Mu0lspw8LZ/yU1OIkMvk GgF48L9UIsSVw== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 6/7] htl: move pthread_condattr_setclock into libc. Date: Tue, 26 Nov 2024 22:53:28 +0200 Message-Id: <20241126205329.2215295-7-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.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 4 +++- sysdeps/htl/pt-condattr-setclock.c | 10 ++++++++-- 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, 16 insertions(+), 6 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index e68cf2b5..56424aee 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -92,7 +92,6 @@ libpthread-routines := \ pt-rwlock-timedrdlock \ pt-rwlock-timedwrlock \ pt-rwlock-unlock \ - pt-condattr-setclock \ pt-condattr-setpshared \ pt-cond-destroy \ pt-cond-init \ @@ -206,6 +205,7 @@ routines := \ pt-condattr-getclock \ pt-condattr-getpshared \ pt-condattr-init \ + pt-condattr-setclock \ pt-getschedparam \ pt-nthreads \ pt-pthread_self \ diff --git a/htl/Versions b/htl/Versions index 95c8a521..533b871e 100644 --- a/htl/Versions +++ b/htl/Versions @@ -30,6 +30,7 @@ libc { pthread_condattr_init; pthread_condattr_destroy; pthread_condattr_getpshared; + pthread_condattr_setclock; } GLIBC_2.21 { @@ -70,6 +71,7 @@ libc { pthread_attr_setguardsize; pthread_condattr_getclock; pthread_condattr_getpshared; + pthread_condattr_setclock; } @@ -127,7 +129,7 @@ libpthread { pthread_cond_broadcast; pthread_cond_destroy; pthread_cond_init; pthread_cond_signal; pthread_cond_timedwait; pthread_cond_wait; - pthread_condattr_setclock; pthread_condattr_setpshared; + pthread_condattr_setpshared; pthread_create; pthread_detach; pthread_exit; diff --git a/sysdeps/htl/pt-condattr-setclock.c b/sysdeps/htl/pt-condattr-setclock.c index d79cc582..33787643 100644 --- a/sysdeps/htl/pt-condattr-setclock.c +++ b/sysdeps/htl/pt-condattr-setclock.c @@ -17,10 +17,11 @@ . */ #include +#include #include int -pthread_condattr_setclock (pthread_condattr_t *attr, clockid_t clock) +__pthread_condattr_setclock (pthread_condattr_t *attr, clockid_t clock) { /* Only a few clocks are allowed. CLOCK_REALTIME is always allowed. CLOCK_MONOTONIC only if the kernel has the necessary support. */ @@ -34,7 +35,7 @@ pthread_condattr_setclock (pthread_condattr_t *attr, clockid_t clock) struct timespec ts; int res; - res = clock_gettime (CLOCK_MONOTONIC, &ts); + res = __clock_gettime (CLOCK_MONOTONIC, &ts); avail = res < 0 ? -1 : 1; } @@ -49,3 +50,8 @@ pthread_condattr_setclock (pthread_condattr_t *attr, clockid_t clock) return 0; } +versioned_symbol (libc, __pthread_condattr_setclock, pthread_condattr_setclock, GLIBC_2_41); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41) +compat_symbol (libpthread, __pthread_condattr_setclock, pthread_condattr_setclock, GLIBC_2_12); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 1e3e6489..a2cc5742 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -53,6 +53,7 @@ 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 +GLIBC_2.12 pthread_condattr_setclock F GLIBC_2.12 pthread_equal F GLIBC_2.12 pthread_getschedparam F GLIBC_2.12 pthread_self F @@ -2509,6 +2510,7 @@ GLIBC_2.41 pthread_attr_setstackaddr F GLIBC_2.41 pthread_attr_setstacksize F GLIBC_2.41 pthread_condattr_getclock F GLIBC_2.41 pthread_condattr_getpshared F +GLIBC_2.41 pthread_condattr_setclock 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 6bacf9a4..cd398f2f 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_setclock F GLIBC_2.12 pthread_condattr_setpshared F GLIBC_2.12 pthread_create F GLIBC_2.12 pthread_detach F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 9a549053..2ff7027d 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1541,6 +1541,7 @@ 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 +GLIBC_2.38 pthread_condattr_setclock F GLIBC_2.38 pthread_equal F GLIBC_2.38 pthread_exit F GLIBC_2.38 pthread_getschedparam F @@ -2204,6 +2205,7 @@ GLIBC_2.41 pthread_attr_setstackaddr F GLIBC_2.41 pthread_attr_setstacksize F GLIBC_2.41 pthread_condattr_getclock F GLIBC_2.41 pthread_condattr_getpshared F +GLIBC_2.41 pthread_condattr_setclock 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 35ff3d03..aa8f7802 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_setclock F GLIBC_2.38 pthread_condattr_setpshared F GLIBC_2.38 pthread_create F GLIBC_2.38 pthread_detach F From patchwork Tue Nov 26 20:53:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 101931 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 99B13385829B for ; Tue, 26 Nov 2024 21:04:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 99B13385829B 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=QBqbKVos 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 901503858C3A for ; Tue, 26 Nov 2024 20:57:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 901503858C3A 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 901503858C3A 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=1732654652; cv=none; b=jR5boEjfu5NZ47ptf1hi7cpo95aQuQsobXNlb4sfeHwIhhbGd4S9yDkqUL+DIpUQPvKo81rwOnV9W6rinPRO1R9PvJ/dERkY/bMdZLgLDd4N70jTrIMcrP2AXc79o2HAIaiY/LYbpMoU6UGmsn6Regtday6ybTVL//8I+VUNU1Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1732654652; c=relaxed/simple; bh=j0tfzkCjzcCqI9Rxo5AxbGFmAc6/G7cOuwZaI3+1wv4=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=cJ60D7zaaXdMkbJOiAW7JnFXXLTZjZQpKQtPSATlzzlUaZT6810XCp8+JtnoMk2T7A710Dj/2+4xqrBcbvGkXYo54fXtT35EhY6QpDgxIQofl4YNxNIIBEX1n8taIHkDg1L3qOMk+VcLQq1R743HtBd+vLpGQF08YgTyCv+JcS8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 901503858C3A Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 7F6A624F45; Tue, 26 Nov 2024 21:57:31 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id X4rWFrXnTXDh; Tue, 26 Nov 2024 21:57:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1732654647; bh=j0tfzkCjzcCqI9Rxo5AxbGFmAc6/G7cOuwZaI3+1wv4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=QBqbKVosmaEBCZhRJHR5niLf3Ke2o4cTA00LbfRcXZi6Y+4wrjv9XwL0F9TctWpbm yELuyFWa6q61/wP/PvgD1rUfjwZT0wJPwwv+Hw+JAxqWHlT5OPpv8Lx/489NSnaFhK NgZjDmfSq44cWc5z+OWuKFCF/fEq66VFFQRlhDvAZR3hJXw/iFd4lDKZ74RclhwocL KHegRPhRzm10VpErRSPmqDI7datkS1PclONW/4sDYmntKosPuQej72C83mW/WGV3Vf ztmfLeBfzhno0GzHThGTlzGh/891xEoGHd6cx9CagZTlO1TKr2DpX/AZ7C74ghb901 MBU+ZFfM3ebUw== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 7/7] htl: move pthread_condattr_setpshared into libc. Date: Tue, 26 Nov 2024 22:53:29 +0200 Message-Id: <20241126205329.2215295-8-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.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org Signed-off-by: gfleury --- htl/Makefile | 2 +- htl/Versions | 4 ++-- sysdeps/htl/pt-condattr-setpshared.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(+), 6 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 56424aee..b0bc0d97 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -92,7 +92,6 @@ libpthread-routines := \ pt-rwlock-timedrdlock \ pt-rwlock-timedwrlock \ pt-rwlock-unlock \ - pt-condattr-setpshared \ pt-cond-destroy \ pt-cond-init \ pt-cond-brdcast \ @@ -206,6 +205,7 @@ routines := \ pt-condattr-getpshared \ pt-condattr-init \ pt-condattr-setclock \ + pt-condattr-setpshared \ pt-getschedparam \ pt-nthreads \ pt-pthread_self \ diff --git a/htl/Versions b/htl/Versions index 533b871e..33a3cfa7 100644 --- a/htl/Versions +++ b/htl/Versions @@ -31,6 +31,7 @@ libc { pthread_condattr_destroy; pthread_condattr_getpshared; pthread_condattr_setclock; + pthread_condattr_setpshared; } GLIBC_2.21 { @@ -72,6 +73,7 @@ libc { pthread_condattr_getclock; pthread_condattr_getpshared; pthread_condattr_setclock; + pthread_condattr_setpshared; } @@ -129,8 +131,6 @@ libpthread { pthread_cond_broadcast; pthread_cond_destroy; pthread_cond_init; pthread_cond_signal; pthread_cond_timedwait; pthread_cond_wait; - pthread_condattr_setpshared; - pthread_create; pthread_detach; pthread_exit; pthread_getattr_np; diff --git a/sysdeps/htl/pt-condattr-setpshared.c b/sysdeps/htl/pt-condattr-setpshared.c index c78906d2..e8c87304 100644 --- a/sysdeps/htl/pt-condattr-setpshared.c +++ b/sysdeps/htl/pt-condattr-setpshared.c @@ -17,10 +17,11 @@ . */ #include +#include #include int -pthread_condattr_setpshared (pthread_condattr_t *attr, int pshared) +__pthread_condattr_setpshared (pthread_condattr_t *attr, int pshared) { switch (pshared) { @@ -36,3 +37,8 @@ pthread_condattr_setpshared (pthread_condattr_t *attr, int pshared) } } stub_warning (pthread_condattr_setpshared) +versioned_symbol (libc, __pthread_condattr_setpshared, pthread_condattr_setpshared, GLIBC_2_41); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_41) +compat_symbol (libpthread, __pthread_condattr_setpshared, pthread_condattr_setpshared, GLIBC_2_12); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index a2cc5742..76ded62c 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -54,6 +54,7 @@ GLIBC_2.12 pthread_condattr_getclock F GLIBC_2.12 pthread_condattr_getpshared F GLIBC_2.12 pthread_condattr_init F GLIBC_2.12 pthread_condattr_setclock F +GLIBC_2.12 pthread_condattr_setpshared F GLIBC_2.12 pthread_equal F GLIBC_2.12 pthread_getschedparam F GLIBC_2.12 pthread_self F @@ -2511,6 +2512,7 @@ GLIBC_2.41 pthread_attr_setstacksize F GLIBC_2.41 pthread_condattr_getclock F GLIBC_2.41 pthread_condattr_getpshared F GLIBC_2.41 pthread_condattr_setclock F +GLIBC_2.41 pthread_condattr_setpshared 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 cd398f2f..72cb549b 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_setpshared F GLIBC_2.12 pthread_create F GLIBC_2.12 pthread_detach F GLIBC_2.12 pthread_exit F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 2ff7027d..c2ee0b1c 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1542,6 +1542,7 @@ GLIBC_2.38 pthread_condattr_getclock F GLIBC_2.38 pthread_condattr_getpshared F GLIBC_2.38 pthread_condattr_init F GLIBC_2.38 pthread_condattr_setclock F +GLIBC_2.38 pthread_condattr_setpshared F GLIBC_2.38 pthread_equal F GLIBC_2.38 pthread_exit F GLIBC_2.38 pthread_getschedparam F @@ -2206,6 +2207,7 @@ GLIBC_2.41 pthread_attr_setstacksize F GLIBC_2.41 pthread_condattr_getclock F GLIBC_2.41 pthread_condattr_getpshared F GLIBC_2.41 pthread_condattr_setclock F +GLIBC_2.41 pthread_condattr_setpshared 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 aa8f7802..bdadfd76 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_setpshared F GLIBC_2.38 pthread_create F GLIBC_2.38 pthread_detach F GLIBC_2.38 pthread_exit F