From patchwork Fri Aug 15 18:14:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 118412 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 424D83858415 for ; Fri, 15 Aug 2025 18:17:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 424D83858415 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=AAZFRR6o 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 003C13858CD9 for ; Fri, 15 Aug 2025 18:15:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 003C13858CD9 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 003C13858CD9 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=1755281717; cv=none; b=bef074ynXQ/Zk/LunNHjFzJqTIQbubZqaoJwQFkSuXuyVrl2ReNLbPIeuA1rsk0FX9L22C8sssx8Fr2tEuyPaK2Rxm4QKhTbWI2T4afZQ3N0+1hsFFNyIwzCBOW+hbc/9eidcgE73DG6iYddmF0DUSA2OtLUs6KUZ7z+Xzr1vuI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755281717; c=relaxed/simple; bh=9b/CtQwQ4QUozE8929uArihHDM6W8+mPEUdrlQuU1hU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=v9Y/7rn73xbihr5XBcmnJq/hH2hDnTwTKjYreD4nqTHIHF4Bf1rhU7j762mwSX3nZ0BfQkUXhXyquUwipCHMvIDLUY4fdTQK4BNcoKzhqDL6hmfFEjcrAKSfS1cDdQXpFQxNbNoyHIOh1oMm2879yAfmoWo/6LB9Mmd/WspgFas= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 003C13858CD9 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 019FA25D34; Fri, 15 Aug 2025 20:15:16 +0200 (CEST) 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 4Atog1Wc0rLC; Fri, 15 Aug 2025 20:15:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1755281715; bh=9b/CtQwQ4QUozE8929uArihHDM6W8+mPEUdrlQuU1hU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=AAZFRR6olHukScttVNahD1sInQrPXhOdTqU+tf8w+75MVmQBVbpHFzkQHf1VH16s2 q9H0OBD8teX7DZxuRPBWm9m8DYWfK27lU+keAhZwWLcF49rytXQ5riIBIBGOJt0tqj 0Rn0OGKFBbUrCdTMC1Yy/N+mJAa9YaZxjt+mFryZ/sTcEQRmS1EldOfnUHAFRoGBtJ EqbEMmoMaV53rnIyqbFJ5ynMzmrMWgNkYUekXe/uyUoxJIyzywPA1s7JP3kJiOLEKQ XCW5Z3nzAzJs2h9tC26g/ntpm2GXeEoXgZb+aveBvnYIwdNhSCdIc2fOzbItZwChXy h6Eot+tvJmZmA== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 01/19] htl: move pthread_setschedprio into libc. Date: Fri, 15 Aug 2025 20:14:42 +0200 Message-ID: <20250815181500.107433-2-gfleury@disroot.org> In-Reply-To: <20250815181500.107433-1-gfleury@disroot.org> References: <20250815181500.107433-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 --- htl/Makefile | 2 +- htl/Versions | 6 +++++- sysdeps/htl/pt-setschedprio.c | 9 ++++++++- sysdeps/htl/pthreadP.h | 3 +++ 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, 21 insertions(+), 5 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 82b7803c..0f9e567f 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -55,7 +55,6 @@ libpthread-routines := \ pt-sigstate-init \ pt-kill \ pt-getcpuclockid \ - pt-setschedprio \ pt-yield \ pt-getname-np \ pt-setname-np \ @@ -204,6 +203,7 @@ routines := \ pt-setcancelstate \ pt-setcanceltype \ pt-setschedparam \ + pt-setschedprio \ pt-setspecific \ pt-sigmask \ pt-sigstate \ diff --git a/htl/Versions b/htl/Versions index 40ee2748..57041917 100644 --- a/htl/Versions +++ b/htl/Versions @@ -84,6 +84,7 @@ libc { pthread_rwlockattr_setpshared; pthread_setcancelstate; pthread_setcanceltype; + pthread_setschedprio; pthread_setspecific; pthread_sigmask; } @@ -186,6 +187,10 @@ libc { pthread_setspecific; } + GLIBC_2.43 { + pthread_setschedprio; + } + GLIBC_PRIVATE { __libc_alloca_cutoff; __libc_pthread_init; @@ -276,7 +281,6 @@ libpthread { pthread_mutex_transfer_np; pthread_setconcurrency; - pthread_setschedprio; pthread_testcancel; pthread_yield; diff --git a/sysdeps/htl/pt-setschedprio.c b/sysdeps/htl/pt-setschedprio.c index 7e1429c4..198fcc88 100644 --- a/sysdeps/htl/pt-setschedprio.c +++ b/sysdeps/htl/pt-setschedprio.c @@ -18,11 +18,18 @@ #include #include +#include int -pthread_setschedprio (pthread_t thread, int prio) +__pthread_setschedprio (pthread_t thread, int prio) { return ENOSYS; } +libc_hidden_def (__pthread_setschedprio) +versioned_symbol (libc, __pthread_setschedprio, pthread_setschedprio, GLIBC_2_43); stub_warning (pthread_setschedprio) + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libc, __pthread_setschedprio, pthread_setschedprio, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 535740f5..384e39d2 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -138,6 +138,9 @@ extern int __pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, int __pshared); libc_hidden_proto (__pthread_rwlockattr_setpshared) +extern int __pthread_setschedprio (pthread_t __thr, int __prio); +libc_hidden_proto (__pthread_setschedprio) + extern int __pthread_cond_init (pthread_cond_t *cond, const pthread_condattr_t *cond_attr); libc_hidden_proto (__pthread_cond_init) diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index aac3cb33..5ba3b7f3 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -111,6 +111,7 @@ GLIBC_2.12 pthread_self F GLIBC_2.12 pthread_setcancelstate F GLIBC_2.12 pthread_setcanceltype F GLIBC_2.12 pthread_setschedparam F +GLIBC_2.12 pthread_setschedprio F GLIBC_2.12 pthread_setspecific F GLIBC_2.12 pthread_sigmask F GLIBC_2.13 __fentry__ F @@ -2633,6 +2634,7 @@ GLIBC_2.42 uabs F GLIBC_2.42 uimaxabs F GLIBC_2.42 ulabs F GLIBC_2.42 ullabs F +GLIBC_2.43 pthread_setschedprio 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 9d2c4cd7..23df0ad6 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -31,7 +31,6 @@ GLIBC_2.12 pthread_join F GLIBC_2.12 pthread_kill F GLIBC_2.12 pthread_mutex_transfer_np F GLIBC_2.12 pthread_setconcurrency F -GLIBC_2.12 pthread_setschedprio F GLIBC_2.12 pthread_spin_destroy F GLIBC_2.12 pthread_spin_init F GLIBC_2.12 pthread_spin_lock F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 8f9d6aa8..06a85b5d 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1603,6 +1603,7 @@ GLIBC_2.38 pthread_self F GLIBC_2.38 pthread_setcancelstate F GLIBC_2.38 pthread_setcanceltype F GLIBC_2.38 pthread_setschedparam F +GLIBC_2.38 pthread_setschedprio F GLIBC_2.38 pthread_setspecific F GLIBC_2.38 pthread_sigmask F GLIBC_2.38 ptrace F @@ -2315,6 +2316,7 @@ GLIBC_2.42 uabs F GLIBC_2.42 uimaxabs F GLIBC_2.42 ulabs F GLIBC_2.42 ullabs F +GLIBC_2.43 pthread_setschedprio 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 81d355a9..21555b7b 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -51,7 +51,6 @@ GLIBC_2.38 pthread_join F GLIBC_2.38 pthread_kill F GLIBC_2.38 pthread_mutex_transfer_np F GLIBC_2.38 pthread_setconcurrency F -GLIBC_2.38 pthread_setschedprio F GLIBC_2.38 pthread_spin_destroy F GLIBC_2.38 pthread_spin_init F GLIBC_2.38 pthread_spin_lock F From patchwork Fri Aug 15 18:14:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 118413 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 63D8F3858412 for ; Fri, 15 Aug 2025 18:19:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 63D8F3858412 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=HdKz6js3 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 0FA743858CDA for ; Fri, 15 Aug 2025 18:15:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0FA743858CDA 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 0FA743858CDA 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=1755281719; cv=none; b=wNNzTyKFv8EI3xIN4j3gi0SGyT2q4x2du05HPXJIeQLP3NAXbdBtMrpcymegklLhnXFZY5bfPB1Wmbkt4WKoZDw5jaN6LQj43loJyqk9mgvqtSbMGF41Uh66XRssYCVka3YUxVdj/Lf/rV5X1jlHGTw7lfVyVHE2WeeXThH++4U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755281719; c=relaxed/simple; bh=QNMwIw7IjgfhkLV0SPFCCPlPhDEy46NIEPTDEs3nBJE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=EDQJ+WMEXGCecd25vehnCSb+IeKAEmEG2fY9ihUhlCHhi/pwyebCJjFt3fMReyyjfdHMDS2EiS9X2y17nnAXvFcxs1y716hjZ9X3WBE3byJqDLg6oyIFgd/qt2Bd7UmXxNtF8O+iWLdp02JPrMfNa/9XmC393PRGZvPUpnTRlrQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0FA743858CDA Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id E1AAE25C43; Fri, 15 Aug 2025 20:15:17 +0200 (CEST) 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 VfpO7WC6cuYD; Fri, 15 Aug 2025 20:15:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1755281717; bh=QNMwIw7IjgfhkLV0SPFCCPlPhDEy46NIEPTDEs3nBJE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=HdKz6js3DrxG8KhxXn0+hmteYqpwhwhlMxq/6/YZffNBmfIWs0/WNcErhtMHLpU3I BW6uuYc+FIabqwtRSIf9fZDTtdhWcEl3Hdf8ajeDVPX5PoS5pqwXdvTbfp8Qf2vbVw Ee2ymIWne49IOD9YWZjzIHBSwzlEW980+acjVvDRzBgu4zuaaDAd420vpXhLwx/9Vt fsg0f1mYOZHOOuUJ395eFCJ3hZ5JWe/ERz/gHoCFkuiHereFlxNrBlq9/2Dje7n81c F9cv9g7FMSR5gc+k/AnPCF0Ud4gPTR3Z1JTHeVtgMeMz6/Ym9Z2nSwGr25vxNZVLkQ ouYh6dORyhhjQ== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 02/19] htl: move pthread_get/setconcurrency into libc. Date: Fri, 15 Aug 2025 20:14:43 +0200 Message-ID: <20250815181500.107433-3-gfleury@disroot.org> In-Reply-To: <20250815181500.107433-1-gfleury@disroot.org> References: <20250815181500.107433-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 --- htl/Makefile | 4 ++-- htl/Versions | 8 +++++--- sysdeps/htl/pt-getconcurrency.c | 9 ++++++++- sysdeps/htl/pt-setconcurrency.c | 9 ++++++++- sysdeps/htl/pthreadP.h | 4 ++++ 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, 35 insertions(+), 11 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 0f9e567f..f33c1dcc 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -45,8 +45,6 @@ libpthread-routines := \ pt-thread-start \ pt-thread-terminate \ pt-startup \ - pt-getconcurrency \ - pt-setconcurrency \ pt-docancel \ pt-sysdep \ pt-setup \ @@ -156,6 +154,7 @@ routines := \ pt-condattr-setclock \ pt-condattr-setpshared \ pt-destroy-specific \ + pt-getconcurrency \ pt-getschedparam \ pt-getspecific \ pt-key-create \ @@ -202,6 +201,7 @@ routines := \ pt-self pt-equal \ pt-setcancelstate \ pt-setcanceltype \ + pt-setconcurrency \ pt-setschedparam \ pt-setschedprio \ pt-setspecific \ diff --git a/htl/Versions b/htl/Versions index 57041917..ad3628eb 100644 --- a/htl/Versions +++ b/htl/Versions @@ -48,6 +48,7 @@ libc { pthread_condattr_getpshared; pthread_condattr_setclock; pthread_condattr_setpshared; + pthread_getconcurrency; pthread_key_create; pthread_key_delete; pthread_mutex_destroy; @@ -84,6 +85,7 @@ libc { pthread_rwlockattr_setpshared; pthread_setcancelstate; pthread_setcanceltype; + pthread_setconcurrency; pthread_setschedprio; pthread_setspecific; pthread_sigmask; @@ -188,6 +190,8 @@ libc { } GLIBC_2.43 { + pthread_getconcurrency; + pthread_setconcurrency; pthread_setschedprio; } @@ -271,7 +275,7 @@ libpthread { pthread_getattr_np; - pthread_getconcurrency; pthread_getcpuclockid; + pthread_getcpuclockid; pthread_join; @@ -280,8 +284,6 @@ libpthread { pthread_mutex_transfer_np; - pthread_setconcurrency; - pthread_testcancel; pthread_yield; diff --git a/sysdeps/htl/pt-getconcurrency.c b/sysdeps/htl/pt-getconcurrency.c index d43ef02f..c20af5db 100644 --- a/sysdeps/htl/pt-getconcurrency.c +++ b/sysdeps/htl/pt-getconcurrency.c @@ -18,9 +18,16 @@ #include #include +#include int -pthread_getconcurrency (void) +__pthread_getconcurrency (void) { return __pthread_concurrency; } +libc_hidden_def (__pthread_getconcurrency) +versioned_symbol (libc, __pthread_getconcurrency, pthread_getconcurrency, GLIBC_2_43); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libc, __pthread_getconcurrency, pthread_getconcurrency, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pt-setconcurrency.c b/sysdeps/htl/pt-setconcurrency.c index 7b4b6f7b..484e0f85 100644 --- a/sysdeps/htl/pt-setconcurrency.c +++ b/sysdeps/htl/pt-setconcurrency.c @@ -18,11 +18,12 @@ #include #include +#include int __pthread_concurrency; int -pthread_setconcurrency (int new_level) +__pthread_setconcurrency (int new_level) { if (new_level < 0) return EINVAL; @@ -31,3 +32,9 @@ pthread_setconcurrency (int new_level) return 0; } +libc_hidden_def (__pthread_setconcurrency) +versioned_symbol (libc, __pthread_setconcurrency, pthread_setconcurrency, GLIBC_2_43); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libc, __pthread_setconcurrency, pthread_setconcurrency, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 384e39d2..5dea8bd1 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -213,6 +213,10 @@ 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); +int __pthread_setconcurrency (int __new_level); +libc_hidden_proto (__pthread_setconcurrency) +int __pthread_getconcurrency (void); +libc_hidden_proto (__pthread_getconcurrency) #define __pthread_raise_internal(__sig) raise (__sig) diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 5ba3b7f3..90faf894 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -71,6 +71,7 @@ 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_getconcurrency F GLIBC_2.12 pthread_getschedparam F GLIBC_2.12 pthread_getspecific F GLIBC_2.12 pthread_key_create F @@ -110,6 +111,7 @@ GLIBC_2.12 pthread_rwlockattr_setpshared F GLIBC_2.12 pthread_self F GLIBC_2.12 pthread_setcancelstate F GLIBC_2.12 pthread_setcanceltype F +GLIBC_2.12 pthread_setconcurrency F GLIBC_2.12 pthread_setschedparam F GLIBC_2.12 pthread_setschedprio F GLIBC_2.12 pthread_setspecific F @@ -2634,6 +2636,8 @@ GLIBC_2.42 uabs F GLIBC_2.42 uimaxabs F GLIBC_2.42 ulabs F GLIBC_2.42 ullabs F +GLIBC_2.43 pthread_getconcurrency F +GLIBC_2.43 pthread_setconcurrency F GLIBC_2.43 pthread_setschedprio 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 23df0ad6..58e46f4e 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -25,12 +25,10 @@ GLIBC_2.12 pthread_create F GLIBC_2.12 pthread_detach F GLIBC_2.12 pthread_exit F GLIBC_2.12 pthread_getattr_np F -GLIBC_2.12 pthread_getconcurrency F GLIBC_2.12 pthread_getcpuclockid F GLIBC_2.12 pthread_join F GLIBC_2.12 pthread_kill F GLIBC_2.12 pthread_mutex_transfer_np F -GLIBC_2.12 pthread_setconcurrency F GLIBC_2.12 pthread_spin_destroy F GLIBC_2.12 pthread_spin_init F GLIBC_2.12 pthread_spin_lock F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 06a85b5d..1d87ec1a 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1554,6 +1554,7 @@ 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_getconcurrency F GLIBC_2.38 pthread_getschedparam F GLIBC_2.38 pthread_getspecific F GLIBC_2.38 pthread_key_create F @@ -1602,6 +1603,7 @@ GLIBC_2.38 pthread_rwlockattr_setpshared F GLIBC_2.38 pthread_self F GLIBC_2.38 pthread_setcancelstate F GLIBC_2.38 pthread_setcanceltype F +GLIBC_2.38 pthread_setconcurrency F GLIBC_2.38 pthread_setschedparam F GLIBC_2.38 pthread_setschedprio F GLIBC_2.38 pthread_setspecific F @@ -2316,6 +2318,8 @@ GLIBC_2.42 uabs F GLIBC_2.42 uimaxabs F GLIBC_2.42 ulabs F GLIBC_2.42 ullabs F +GLIBC_2.43 pthread_getconcurrency F +GLIBC_2.43 pthread_setconcurrency F GLIBC_2.43 pthread_setschedprio 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 21555b7b..b40dda87 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -43,14 +43,12 @@ GLIBC_2.38 pthread_create F GLIBC_2.38 pthread_detach F GLIBC_2.38 pthread_exit F GLIBC_2.38 pthread_getattr_np F -GLIBC_2.38 pthread_getconcurrency F GLIBC_2.38 pthread_getcpuclockid F GLIBC_2.38 pthread_hurd_cond_timedwait_np F GLIBC_2.38 pthread_hurd_cond_wait_np F GLIBC_2.38 pthread_join F GLIBC_2.38 pthread_kill F GLIBC_2.38 pthread_mutex_transfer_np F -GLIBC_2.38 pthread_setconcurrency F GLIBC_2.38 pthread_spin_destroy F GLIBC_2.38 pthread_spin_init F GLIBC_2.38 pthread_spin_lock F From patchwork Fri Aug 15 18:14:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 118414 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 923D23858CB6 for ; Fri, 15 Aug 2025 18:19:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 923D23858CB6 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (2048-bit key, secure) header.d=disroot.org header.i=@disroot.org header.a=rsa-sha256 header.s=mail header.b=Sh5W/gAl 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 B17B53858415 for ; Fri, 15 Aug 2025 18:15:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B17B53858415 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 B17B53858415 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=1755281720; cv=none; b=MBEOmZwPdk1WwnI9IpReiwrppnGBWtkqhul6Pj6cmt4Tv8ycCFZ7Q3FiG/XJAuHyBgX4wQDFtL0egf/fhiEL3Th/dxaUnTSBG2d9om4jYqqfLeMtr2hnplN4KIz31XmXkYqT0PMhP626wHN/tbwEq8+IzqSV1cCqFWurh+Dulhs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755281720; c=relaxed/simple; bh=Zz/+YVU6Yce/XqdXq0oK5Rcsg1Ijfy+qBgccFe59kbY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Y/PDUTfU/CUTpBl2aapzkVutmr0BbEmYLVsv2gP/jIleb47wYoHckXNfK+/GusEFjqzQSt+wawH4TwNcUEjWN8Sz069OrVwiaScSCzjUWlfu+ozPwfoOmYhpHKGtGwbgGinw5EBczhVi2Zh0eYmN+s1RSBSTt0IOdSOB57wrqOQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B17B53858415 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id D1C18209B6; Fri, 15 Aug 2025 20:15:19 +0200 (CEST) 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 3PBJOhYNAbVY; Fri, 15 Aug 2025 20:15:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1755281719; bh=Zz/+YVU6Yce/XqdXq0oK5Rcsg1Ijfy+qBgccFe59kbY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Sh5W/gAlHWud/Fy4M1Y0u6f0A13im3n/IUPQAPETG6L2OzSQnu05/eM6Om+2u+cFl NqpFlOB7ukU6/k2u5R0iRYpkRQrLu7n2zB0jIgQF7CXzgcf1cPmkfXFo3/kJVQM4fb TnFrvCSo0Re6sW/Rc6GnJkUiER21LIQF+G3WLF/J/uYlhGJfZJEewiWOX3kyW3yXNe bopG3dFR8E2aX93amNGCcB+UjsDiUxWdMq61ZIjWo76tqJWRMdxqO0pzyIuk7ZqWs1 M50kR1IpRa/dFvsM26CXdVZ+JEptcWfXhxb3edbxIACn5AVIbqcLYpGGf1gif5YLM/ BiKiPV4MecOug== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 03/19] htl: move __pthread_init_{specific, static_tls}, __pthread_{alloc}, dealloc} into libc. Date: Fri, 15 Aug 2025 20:14:44 +0200 Message-ID: <20250815181500.107433-4-gfleury@disroot.org> In-Reply-To: <20250815181500.107433-1-gfleury@disroot.org> References: <20250815181500.107433-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 --- htl/Makefile | 6 +++--- htl/Versions | 5 +++++ htl/pt-alloc.c | 6 +++++- htl/pt-dealloc.c | 3 +++ htl/pt-internal.h | 5 ++++- sysdeps/htl/pt-init-specific.c | 2 ++ sysdeps/htl/pthreadP.h | 3 ++- 7 files changed, 24 insertions(+), 6 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index f33c1dcc..1b2b501f 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -25,11 +25,8 @@ SYSDEPS := lockfile LCLHDRS := libpthread-routines := \ - pt-init-specific \ - pt-alloc \ pt-create \ pt-getattr \ - pt-dealloc \ pt-detach \ pt-exit \ pt-initialize \ @@ -108,6 +105,7 @@ routines := \ forward \ htlfreeres \ libc_pthread_init \ + pt-alloc \ pt-attr \ pt-attr-destroy \ pt-attr-getdetachstate \ @@ -153,10 +151,12 @@ routines := \ pt-condattr-init \ pt-condattr-setclock \ pt-condattr-setpshared \ + pt-dealloc \ pt-destroy-specific \ pt-getconcurrency \ pt-getschedparam \ pt-getspecific \ + pt-init-specific \ pt-key-create \ pt-key-delete \ pt-mutex-checklocked \ diff --git a/htl/Versions b/htl/Versions index ad3628eb..851a2a53 100644 --- a/htl/Versions +++ b/htl/Versions @@ -201,9 +201,11 @@ libc { __pthread_cleanup_stack; __pthread_total; ___pthread_self; + __pthread_alloc; __pthread_block; __pthread_block_intr; __pthread_init_thread; + __pthread_init_static_tls; __pthread_default_attr; __pthread_attr_init; __pthread_attr_getstacksize; @@ -212,6 +214,8 @@ libc { __pthread_attr_setstacksize; __pthread_attr_setstackaddr; __pthread_attr_setstack; + __pthread_dealloc; + __pthread_dealloc_finish; __pthread_setcancelstate; __pthread_cond_broadcast; __pthread_cond_destroy; @@ -225,6 +229,7 @@ libc { __pthread_destroy_specific; __pthread_getspecific; __pthread_key_delete; + __pthread_max_threads; __pthread_mutex_checklocked; __pthread_mutex_destroy; __pthread_mutex_init; diff --git a/htl/pt-alloc.c b/htl/pt-alloc.c index c0074b44..3b3f9455 100644 --- a/htl/pt-alloc.c +++ b/htl/pt-alloc.c @@ -23,6 +23,7 @@ #include #include +#include /* This braindamage is necessary because the standard says that some of the threads functions "shall fail" if "No thread could be found @@ -30,6 +31,7 @@ /* The size of the thread ID lookup table. */ int __pthread_max_threads; +libc_hidden_data_def (__pthread_max_threads) /* List of thread structures corresponding to free thread IDs. */ struct __pthread *__pthread_free_threads; @@ -70,7 +72,7 @@ initialize_pthread (struct __pthread *new) /* Allocate a new thread structure and its pthread thread ID (but not a kernel thread). */ int -__pthread_alloc (struct __pthread **pthread) +__pthread_alloc (struct __pthread **pthread) { error_t err; @@ -201,6 +203,7 @@ retry: *pthread = new; return 0; } +libc_hidden_def (__pthread_alloc) void attribute_hidden @@ -230,3 +233,4 @@ __pthread_init_static_tls (struct link_map *map) } __libc_rwlock_unlock (GL (dl_pthread_threads_lock)); } +libc_hidden_def (__pthread_init_static_tls) diff --git a/htl/pt-dealloc.c b/htl/pt-dealloc.c index 13417df4..7a90302b 100644 --- a/htl/pt-dealloc.c +++ b/htl/pt-dealloc.c @@ -23,6 +23,7 @@ #include #include +#include /* List of thread structures corresponding to free thread IDs. */ extern struct __pthread *__pthread_free_threads; @@ -55,6 +56,7 @@ __pthread_dealloc (struct __pthread *pthread) __pthread_enqueue (&__pthread_free_threads, pthread); __pthread_mutex_unlock (&__pthread_free_threads_lock); } +libc_hidden_def (__pthread_dealloc) /* Confirm deallocation of the thread structure for PTHREAD. */ void @@ -69,3 +71,4 @@ __pthread_dealloc_finish (struct __pthread *pthread) which reads this variable. */ pthread->terminated = TRUE; } +libc_hidden_def (__pthread_dealloc_finish) diff --git a/htl/pt-internal.h b/htl/pt-internal.h index 8b37838b..54385630 100644 --- a/htl/pt-internal.h +++ b/htl/pt-internal.h @@ -172,6 +172,7 @@ extern int __pthread_concurrency; /* The size of the thread ID lookup table. */ extern int __pthread_max_threads; +libc_hidden_proto (__pthread_max_threads) #define __pthread_getid(thread) \ ({ struct __pthread *__t = NULL; \ @@ -209,6 +210,7 @@ extern int __pthread_create_internal (struct __pthread **__restrict pthread, /* Allocate a new thread structure and a pthread thread ID (but not a kernel thread or a stack). THREAD has one reference. */ extern int __pthread_alloc (struct __pthread **thread); +libc_hidden_proto (__pthread_alloc) /* Deallocate the content of the thread structure. This is the dual of __pthread_alloc (N.B. it does not call __pthread_stack_dealloc nor @@ -217,11 +219,12 @@ extern int __pthread_alloc (struct __pthread **thread); to call __pthread_dealloc_finish when it is really finished with using THREAD. */ extern void __pthread_dealloc (struct __pthread *thread); +libc_hidden_proto (__pthread_dealloc) /* Confirm deallocating the thread structure. Before calling this the structure will not be reused yet. */ extern void __pthread_dealloc_finish (struct __pthread *pthread); - +libc_hidden_proto (__pthread_dealloc_finish) /* Allocate a stack of size STACKSIZE. The stack base shall be returned in *STACKADDR. */ diff --git a/sysdeps/htl/pt-init-specific.c b/sysdeps/htl/pt-init-specific.c index f740b120..56a49d61 100644 --- a/sysdeps/htl/pt-init-specific.c +++ b/sysdeps/htl/pt-init-specific.c @@ -20,6 +20,8 @@ #include #include +#include + error_t __pthread_init_specific (struct __pthread *thread) diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 5dea8bd1..1538fdee 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -28,7 +28,8 @@ /* Attribute to indicate thread creation was issued from C11 thrd_create. */ #define ATTR_C11_THREAD ((void*)(uintptr_t)-1) -extern void __pthread_init_static_tls (struct link_map *) attribute_hidden; +extern void __pthread_init_static_tls (struct link_map *); +libc_hidden_proto (__pthread_init_static_tls) /* These represent the interface used by glibc itself. */ From patchwork Fri Aug 15 18:14:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 118417 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 72A8A3858412 for ; Fri, 15 Aug 2025 18:24:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 72A8A3858412 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=FEWs40DD 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 5969A3858CB6 for ; Fri, 15 Aug 2025 18:15:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5969A3858CB6 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 5969A3858CB6 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=1755281722; cv=none; b=q6hw1wAzPa9NMnADV0VeSuKXy/ANHly9IA69Wgec9x7Mm04F+C7I5yb4aIoENcQuCMvZ9U+l46bS7GeZA+CeZIMjmusg1jZ7hzE/rS+ylHdKN0/RXsprE6bCV1shSLl9xYRJ2YtW8YxuOKcnvvm/+SDYk2VyEzzntiw6rnwZ1CI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755281722; c=relaxed/simple; bh=r1TlMZcqBijd4nKkdyD2H4MyPu4WnvGwmKghoCUlcNQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Vnh22urddnEMpBT2fcQ5fnAd4VyMLdLE3C9z0f4FQcXvZ4JDJMJ5FPl3I2cPtnhUXDHJp1Jz+yKADYaT50aYZZfWKfhkCquikFUJ2sEE3T/UPglFBzZyotigrkBJ+iWpTv7OdQdZtiBo4Eb/6s3ImK05tVFO+qp2ngjflmODQS8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5969A3858CB6 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 5326020CA3; Fri, 15 Aug 2025 20:15:21 +0200 (CEST) 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 wQAc3vsVgoG2; Fri, 15 Aug 2025 20:15:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1755281720; bh=r1TlMZcqBijd4nKkdyD2H4MyPu4WnvGwmKghoCUlcNQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FEWs40DDK5zwmmnlG1vy7EC+H+g0qTvLCc6C3Qu+BcIuUnyZERmI1k17zdwgWPFpT hsmhq5IXSXOSXwL/aFAi/y8mtcC1PpYY9RhY5p3znQlMVrKurqUdpfjKUi6ugpMSf8 lhbxWAycnxM8SKO2iOZBKJrz7DXsQN/cF/g/EskjqNi/YqyZzyxQmmPFVMSQTljxzC E2C/UBV7p1K/cEoVoeBMD/BfD4+tfPSdbD4f9k/n4XloTX5Vxfg7j+tvwx3Hg8vqNJ CY0j7X94dpmvH0fFRLQp/6NMOsPoa8qXYF+FDRlMOtaaJ7jfUJyF6bBKUMSPPFT3Lv s27o1Drw+b8qg== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 04/19] htl: move __pthread_stack_alloc into libc. Date: Fri, 15 Aug 2025 20:14:45 +0200 Message-ID: <20250815181500.107433-5-gfleury@disroot.org> In-Reply-To: <20250815181500.107433-1-gfleury@disroot.org> References: <20250815181500.107433-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 --- htl/Makefile | 2 +- htl/Versions | 1 + htl/pt-internal.h | 1 + sysdeps/mach/htl/pt-stack-alloc.c | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/htl/Makefile b/htl/Makefile index 1b2b501f..88d02ca8 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -37,7 +37,6 @@ libpthread-routines := \ pt-mutex-transfer-np \ pt-hurd-cond-wait \ pt-hurd-cond-timedwait \ - pt-stack-alloc \ pt-thread-alloc \ pt-thread-start \ pt-thread-terminate \ @@ -208,6 +207,7 @@ routines := \ pt-sigmask \ pt-sigstate \ pt-sigstate-destroy \ + pt-stack-alloc \ pt-timedblock \ pt-timedblock-intr \ pt-wakeup \ diff --git a/htl/Versions b/htl/Versions index 851a2a53..8d9dad88 100644 --- a/htl/Versions +++ b/htl/Versions @@ -245,6 +245,7 @@ libc { __pthread_sigstate; __pthread_sigstate_destroy; __pthread_sigmask; + __pthread_stack_alloc; __pthread_timedblock; __pthread_timedblock_intr; __pthread_wakeup; diff --git a/htl/pt-internal.h b/htl/pt-internal.h index 54385630..28b77850 100644 --- a/htl/pt-internal.h +++ b/htl/pt-internal.h @@ -229,6 +229,7 @@ libc_hidden_proto (__pthread_dealloc_finish) /* Allocate a stack of size STACKSIZE. The stack base shall be returned in *STACKADDR. */ extern int __pthread_stack_alloc (void **stackaddr, size_t stacksize); +libc_hidden_proto (__pthread_stack_alloc) /* Deallocate the stack STACKADDR of size STACKSIZE. */ extern void __pthread_stack_dealloc (void *stackaddr, size_t stacksize); diff --git a/sysdeps/mach/htl/pt-stack-alloc.c b/sysdeps/mach/htl/pt-stack-alloc.c index 3e196f8c..64cc1865 100644 --- a/sysdeps/mach/htl/pt-stack-alloc.c +++ b/sysdeps/mach/htl/pt-stack-alloc.c @@ -21,6 +21,7 @@ #include #include +#include /* Allocate a new stack of size STACKSIZE. If successful, store the address of the newly allocated stack in *STACKADDR and return 0. @@ -44,3 +45,4 @@ __pthread_stack_alloc (void **stackaddr, size_t stacksize) err = EAGAIN; return err; } +libc_hidden_def (__pthread_stack_alloc) From patchwork Fri Aug 15 18:14:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 118415 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 99C78385841D for ; Fri, 15 Aug 2025 18:21:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 99C78385841D Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (2048-bit key, secure) header.d=disroot.org header.i=@disroot.org header.a=rsa-sha256 header.s=mail header.b=H8DEcs9h 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 02B44385841E for ; Fri, 15 Aug 2025 18:15:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 02B44385841E 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 02B44385841E 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=1755281724; cv=none; b=L0jPiBGAyOhBy7lbF+GBsDdyDAzDHJGgZFhgigp/UMihnEAycwxJKR+tNMpTEO6+ARmWn4NoHluT1g3hZTgHbuszd4etnffgVajamTavZnjsx/koKGu/8UVdyZGlMbP7k5lZvV0wqllV8qd3pkuyPZyO9XadbV8YXmU9+LBzfv4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755281724; c=relaxed/simple; bh=5GVGg0eE4f9iR3L0yI2Hb8FIz7qqtlXvsETuXzROjjw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=EJ8Nx0i3qMG51shSNIrbsgcSxzcpzE/HifdzwcrxMBoLLcCjkKdPi1zsxYWeDByoQDStQuYcSTzcZXYRx8VOQ7/A+I9HRj5BmJKEtX0fQTqQ12ODqkdJvXqvX5mIlnArbGC/sOxc2Hc1ZdxDjttKRtGv1sTFoR10ykaA0FRqiqQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 02B44385841E Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 19ADA25C43; Fri, 15 Aug 2025 20:15:23 +0200 (CEST) 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 zrHTif2ocE9V; Fri, 15 Aug 2025 20:15:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1755281722; bh=5GVGg0eE4f9iR3L0yI2Hb8FIz7qqtlXvsETuXzROjjw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=H8DEcs9hBQQxQaucaA/VexpCzFEDGkRr8uQ4sVNH+u8sDQc7XIEiZnE7TqdhONXpJ afcs3cJhi6ulTtuhFSxuw84FF3/vqj993Uc9QyCfn9hhMjlNaEFykKrutEIR94ec6m DA/OqqXCmIzTGssKxyfzzkIkYxSiEO+pS3udNIH9VkLNGxXa5cSUIWKZjKyW88Q2Vm vVMCyML2tZ68ap37zeg7XFXoba4E6t7QoUkZQV3Zv9ww7biTjsxP7Hi5Zvr2YmGJtG pefwBlp+baiXZgTLMam1JabYCZ5GaSzQltbMOAl6I4PhHgf+Mzq95f+ugAFg/lvfHO bKbYjd/4e88KA== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 05/19] htl: move __pthread_thread_{alloc, start, terminate} into libc. Date: Fri, 15 Aug 2025 20:14:46 +0200 Message-ID: <20250815181500.107433-6-gfleury@disroot.org> In-Reply-To: <20250815181500.107433-1-gfleury@disroot.org> References: <20250815181500.107433-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 --- htl/Makefile | 6 +++--- htl/Versions | 3 +++ htl/pt-internal.h | 4 +++- sysdeps/mach/htl/pt-thread-alloc.c | 1 + sysdeps/mach/htl/pt-thread-start.c | 1 + sysdeps/mach/htl/pt-thread-terminate.c | 1 + 6 files changed, 12 insertions(+), 4 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 88d02ca8..59fcab1e 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -37,9 +37,6 @@ libpthread-routines := \ pt-mutex-transfer-np \ pt-hurd-cond-wait \ pt-hurd-cond-timedwait \ - pt-thread-alloc \ - pt-thread-start \ - pt-thread-terminate \ pt-startup \ pt-docancel \ pt-sysdep \ @@ -210,6 +207,9 @@ routines := \ pt-stack-alloc \ pt-timedblock \ pt-timedblock-intr \ + pt-thread-alloc \ + pt-thread-start \ + pt-thread-terminate \ pt-wakeup \ # routines shared-only-routines = forward diff --git a/htl/Versions b/htl/Versions index 8d9dad88..c216db4b 100644 --- a/htl/Versions +++ b/htl/Versions @@ -248,6 +248,9 @@ libc { __pthread_stack_alloc; __pthread_timedblock; __pthread_timedblock_intr; + __pthread_thread_alloc; + __pthread_thread_start; + __pthread_thread_terminate; __pthread_wakeup; } } diff --git a/htl/pt-internal.h b/htl/pt-internal.h index 28b77850..7651446b 100644 --- a/htl/pt-internal.h +++ b/htl/pt-internal.h @@ -247,9 +247,11 @@ extern int __pthread_setup (struct __pthread *__restrict thread, /* Allocate a kernel thread (and any miscellaneous system dependent resources) for THREAD; it must not be placed on the run queue. */ extern int __pthread_thread_alloc (struct __pthread *thread); +libc_hidden_proto (__pthread_thread_alloc) /* Start THREAD making it eligible to run. */ extern int __pthread_thread_start (struct __pthread *thread); +libc_hidden_proto (__pthread_thread_start) /* Terminate the kernel thread associated with THREAD, and deallocate its stack as well as any other kernel resource associated with it. @@ -263,7 +265,7 @@ extern int __pthread_thread_start (struct __pthread *thread); has started, no other thread can terminate it, so that thread-local variables created by that thread are correctly released. */ extern void __pthread_thread_terminate (struct __pthread *thread); - +libc_hidden_proto (__pthread_thread_terminate) /* Called by a thread just before it calls the provided start routine. */ diff --git a/sysdeps/mach/htl/pt-thread-alloc.c b/sysdeps/mach/htl/pt-thread-alloc.c index 3f840e40..020ff74b 100644 --- a/sysdeps/mach/htl/pt-thread-alloc.c +++ b/sysdeps/mach/htl/pt-thread-alloc.c @@ -92,3 +92,4 @@ __pthread_thread_alloc (struct __pthread *thread) return 0; } +libc_hidden_def (__pthread_thread_alloc) diff --git a/sysdeps/mach/htl/pt-thread-start.c b/sysdeps/mach/htl/pt-thread-start.c index 65bc8d4a..64811e4d 100644 --- a/sysdeps/mach/htl/pt-thread-start.c +++ b/sysdeps/mach/htl/pt-thread-start.c @@ -51,3 +51,4 @@ __pthread_thread_start (struct __pthread *thread) return 0; } +libc_hidden_def (__pthread_thread_start) diff --git a/sysdeps/mach/htl/pt-thread-terminate.c b/sysdeps/mach/htl/pt-thread-terminate.c index 58f265db..05ca3eda 100644 --- a/sysdeps/mach/htl/pt-thread-terminate.c +++ b/sysdeps/mach/htl/pt-thread-terminate.c @@ -91,3 +91,4 @@ __pthread_thread_terminate (struct __pthread *thread) /* We are out of luck. */ assert_perror (err); } +libc_hidden_def (__pthread_thread_terminate) From patchwork Fri Aug 15 18:14:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 118421 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 47D52385841E for ; Fri, 15 Aug 2025 18:29:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 47D52385841E 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=cQ0Ed9TP 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 1E36C3858401 for ; Fri, 15 Aug 2025 18:15:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1E36C3858401 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 1E36C3858401 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=1755281726; cv=none; b=fSwbqTg2ZbZm44KuzdYZc5pGKTGUrTLI8GI8G7S5triy6xNAtGYTXYJnvUQYWtiCyHbspOmwBx3ujMSL67vZzBMckKxgT/rx2MgS4rLlb/h7YZGof+Whtl/Jh0MoMyBmUwk4d2shpcn0OCHxqSsdXYLA1kB5sz878Mn9RLdfmzE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755281726; c=relaxed/simple; bh=2lIoPW1RPdNwM9msThCwKCPsxS3DfzPjvma2D0NMdV4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=BNub588lGCJk0HMfA04K6oxNPF3jgnIYJ0G6CwdbZzoFo9LkK0akcqCbeiZDhagN+Iw6GYzXr2yrylRreSnE2wYroFWZt0irDYeeEmf0dLeU0jDTwNxRygySrxong9+2a7r0DNWeFFJ3P5bd9PFElDEWCa9F7u1rrg6saM/iXh8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1E36C3858401 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 2642D25D07; Fri, 15 Aug 2025 20:15:25 +0200 (CEST) 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 NTDb2NHEzNUd; Fri, 15 Aug 2025 20:15:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1755281724; bh=2lIoPW1RPdNwM9msThCwKCPsxS3DfzPjvma2D0NMdV4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=cQ0Ed9TPUh25IduHOkOMpVGUVL81fH5IJpVBFpVm1Li6n6NxdPqomhxu5lhwyTk5p Di4ru271jghQmRuuMyvGax6FF7XpIq8TqgBE6oGQsgW8eIGJcJwDtHb1qJRxPXEq8i zoeqDDOxvc6muhMI/bk8LPDwK68/8LpV+peNZ2KOzfQ5j511ggFtlDyvYmrJU0ha++ w2P0PQ0ym8Z2L+WD3HyL+p3SRThbp8oaZAJYGr7oICAXzJz5K5sBcSzkqNW0kQaWYa 41zXh3iZPqe0tzQASuuDdSDTPaBccBu4kqEhsT0T8Tx+3XQXhKZ8YxGhKQ6Sdj6Vzs asTYOzo6byMwg== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 06/19] htl: move pthread_getcpuclockid into libc. Date: Fri, 15 Aug 2025 20:14:47 +0200 Message-ID: <20250815181500.107433-7-gfleury@disroot.org> In-Reply-To: <20250815181500.107433-1-gfleury@disroot.org> References: <20250815181500.107433-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 --- htl/Makefile | 2 +- htl/Versions | 4 ++-- sysdeps/htl/pt-getcpuclockid.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 59fcab1e..f644cb04 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -45,7 +45,6 @@ libpthread-routines := \ pt-spin \ pt-sigstate-init \ pt-kill \ - pt-getcpuclockid \ pt-yield \ pt-getname-np \ pt-setname-np \ @@ -152,6 +151,7 @@ routines := \ pt-getconcurrency \ pt-getschedparam \ pt-getspecific \ + pt-getcpuclockid \ pt-init-specific \ pt-key-create \ pt-key-delete \ diff --git a/htl/Versions b/htl/Versions index c216db4b..68c7f01e 100644 --- a/htl/Versions +++ b/htl/Versions @@ -15,6 +15,7 @@ libc { pthread_equal; pthread_getschedparam; pthread_getspecific; + pthread_getcpuclockid; pthread_setschedparam; pthread_attr_destroy; pthread_attr_getguardsize; @@ -191,6 +192,7 @@ libc { GLIBC_2.43 { pthread_getconcurrency; + pthread_getcpuclockid; pthread_setconcurrency; pthread_setschedprio; } @@ -284,8 +286,6 @@ libpthread { pthread_getattr_np; - pthread_getcpuclockid; - pthread_join; pthread_kill; diff --git a/sysdeps/htl/pt-getcpuclockid.c b/sysdeps/htl/pt-getcpuclockid.c index 0402cef9..b37b7b78 100644 --- a/sysdeps/htl/pt-getcpuclockid.c +++ b/sysdeps/htl/pt-getcpuclockid.c @@ -20,9 +20,10 @@ #include #include +#include int -pthread_getcpuclockid (pthread_t thread, clockid_t *clock) +__pthread_getcpuclockid (pthread_t thread, clockid_t *clock) { #ifdef CLOCK_THREAD_CPUTIME_ID *clock = CLOCK_THREAD_CPUTIME_ID; @@ -33,3 +34,8 @@ pthread_getcpuclockid (pthread_t thread, clockid_t *clock) } stub_warning (pthread_getcpuclockid) +versioned_symbol (libc, __pthread_getcpuclockid, pthread_getcpuclockid, GLIBC_2_43); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libpthread, __pthread_getcpuclockid, pthread_getcpuclockid, GLIBC_2_12); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 90faf894..791920f2 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -72,6 +72,7 @@ GLIBC_2.12 pthread_condattr_setclock F GLIBC_2.12 pthread_condattr_setpshared F GLIBC_2.12 pthread_equal F GLIBC_2.12 pthread_getconcurrency F +GLIBC_2.12 pthread_getcpuclockid F GLIBC_2.12 pthread_getschedparam F GLIBC_2.12 pthread_getspecific F GLIBC_2.12 pthread_key_create F @@ -2637,6 +2638,7 @@ GLIBC_2.42 uimaxabs F GLIBC_2.42 ulabs F GLIBC_2.42 ullabs F GLIBC_2.43 pthread_getconcurrency F +GLIBC_2.43 pthread_getcpuclockid F GLIBC_2.43 pthread_setconcurrency F GLIBC_2.43 pthread_setschedprio F GLIBC_2.5 __readlinkat_chk F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 58e46f4e..6c9ca8e1 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -25,7 +25,6 @@ GLIBC_2.12 pthread_create F GLIBC_2.12 pthread_detach F GLIBC_2.12 pthread_exit F GLIBC_2.12 pthread_getattr_np F -GLIBC_2.12 pthread_getcpuclockid F GLIBC_2.12 pthread_join F GLIBC_2.12 pthread_kill F GLIBC_2.12 pthread_mutex_transfer_np F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 1d87ec1a..0e03d9dc 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1555,6 +1555,7 @@ GLIBC_2.38 pthread_condattr_setpshared F GLIBC_2.38 pthread_equal F GLIBC_2.38 pthread_exit F GLIBC_2.38 pthread_getconcurrency F +GLIBC_2.38 pthread_getcpuclockid F GLIBC_2.38 pthread_getschedparam F GLIBC_2.38 pthread_getspecific F GLIBC_2.38 pthread_key_create F @@ -2319,6 +2320,7 @@ GLIBC_2.42 uimaxabs F GLIBC_2.42 ulabs F GLIBC_2.42 ullabs F GLIBC_2.43 pthread_getconcurrency F +GLIBC_2.43 pthread_getcpuclockid F GLIBC_2.43 pthread_setconcurrency F GLIBC_2.43 pthread_setschedprio 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 b40dda87..e68935dc 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -43,7 +43,6 @@ GLIBC_2.38 pthread_create F GLIBC_2.38 pthread_detach F GLIBC_2.38 pthread_exit F GLIBC_2.38 pthread_getattr_np F -GLIBC_2.38 pthread_getcpuclockid F GLIBC_2.38 pthread_hurd_cond_timedwait_np F GLIBC_2.38 pthread_hurd_cond_wait_np F GLIBC_2.38 pthread_join F From patchwork Fri Aug 15 18:14:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 118419 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 3D94B385840C for ; Fri, 15 Aug 2025 18:27:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D94B385840C 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=Ps4kZTfe 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 137E33858416 for ; Fri, 15 Aug 2025 18:15:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 137E33858416 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 137E33858416 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=1755281729; cv=none; b=Ld7i1brKCHgXDKgMvKs0HohuBbyR/vgvM7x3bmo+2YRx7P24KyC1Q8jpMufR7x9Rb0nUsgcyYDzl4/K2gvq/XkFrRFNPr4tPQDAPipwJDCpGDkW6jXSui8rIF5+779Uo0HnIY9+iQL36AGpZarIR4QyG73rl+9+k9hUbXnGx4aE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755281729; c=relaxed/simple; bh=XGbte6PN4YM7E8Jhd2wrVcmAgq7XeUcOTtOcrqAX0ow=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=uG15eoEAM3jQGZluG0tEXnEQO5a9k7ls3rP6yYVU8h8CJ1RmaE3IJpsRrVOFeWNHOv7CJvnvazoXkSBpopNBZt2VF3ClrCMqilDAc5h3oqFjmXVC1KEWFJf5qNlxoaNlmvuFmru2eixtrbGmYrMumstOkK+KJRBlFT1sUbIEtjE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 137E33858416 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 49B6020CA3; Fri, 15 Aug 2025 20:15:27 +0200 (CEST) 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 qXMFCFC4YWer; Fri, 15 Aug 2025 20:15:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1755281726; bh=XGbte6PN4YM7E8Jhd2wrVcmAgq7XeUcOTtOcrqAX0ow=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Ps4kZTfeZWnD/Ee8Sc0DHagwEnCJjuA3xlH3RIrFDoQ8x+XSBKPLFjU2SfkGy7euj UlOGMbwK6j0whWmJEX3Hhi2RkpZ4ao1qW1yWUsjlDDFp8ZfZbiVzEfs/o99XbNWIhm bEdJjPf+dUpz4EVRiMPx8qT/BCGw60dHQyQxpK0MawEWd485YT2v61/80O8zlL8c8u rV+VK3sY83dc+L5KyeN26eG3frGo9rngPf/TbktlOQuo2htes9R1DLSahMpftgqacZ 8Dsp2c3rzLUAgXQ+Co+uMXcw5iT+2Fv0S2CL8QYpSMwkAUtd0w84ZkDjfVflRM53Ns YwOVSR4xnL4kA== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 07/19] htl: move pthread_yield into libc. Date: Fri, 15 Aug 2025 20:14:48 +0200 Message-ID: <20250815181500.107433-8-gfleury@disroot.org> In-Reply-To: <20250815181500.107433-1-gfleury@disroot.org> References: <20250815181500.107433-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 --- htl/Makefile | 2 +- htl/Versions | 3 ++- htl/pt-yield.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, 15 insertions(+), 5 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index f644cb04..ea31f9b1 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -45,7 +45,6 @@ libpthread-routines := \ pt-spin \ pt-sigstate-init \ pt-kill \ - pt-yield \ pt-getname-np \ pt-setname-np \ sem_close \ @@ -211,6 +210,7 @@ routines := \ pt-thread-start \ pt-thread-terminate \ pt-wakeup \ + pt-yield \ # routines shared-only-routines = forward diff --git a/htl/Versions b/htl/Versions index 68c7f01e..e6bd1289 100644 --- a/htl/Versions +++ b/htl/Versions @@ -90,6 +90,7 @@ libc { pthread_setschedprio; pthread_setspecific; pthread_sigmask; + pthread_yield; } GLIBC_2.21 { @@ -195,6 +196,7 @@ libc { pthread_getcpuclockid; pthread_setconcurrency; pthread_setschedprio; + pthread_yield; } GLIBC_PRIVATE { @@ -294,7 +296,6 @@ libpthread { pthread_mutex_transfer_np; pthread_testcancel; - pthread_yield; sem_close; sem_destroy; sem_getvalue; sem_init; sem_open; sem_post; sem_timedwait; sem_trywait; sem_unlink; sem_wait; diff --git a/htl/pt-yield.c b/htl/pt-yield.c index 0cab615a..f9f0b634 100644 --- a/htl/pt-yield.c +++ b/htl/pt-yield.c @@ -18,9 +18,16 @@ #include #include +#include + int -pthread_yield (void) +__pthread_yield (void) { return __sched_yield (); } +versioned_symbol (libc, __pthread_yield, pthread_yield, GLIBC_2_43); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libpthread, __pthread_yield, pthread_yield, GLIBC_2_12); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 791920f2..20cff5f1 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -117,6 +117,7 @@ GLIBC_2.12 pthread_setschedparam F GLIBC_2.12 pthread_setschedprio F GLIBC_2.12 pthread_setspecific F GLIBC_2.12 pthread_sigmask F +GLIBC_2.12 pthread_yield F GLIBC_2.13 __fentry__ F GLIBC_2.14 syncfs F GLIBC_2.15 __fdelt_chk F @@ -2641,6 +2642,7 @@ GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F GLIBC_2.43 pthread_setconcurrency F GLIBC_2.43 pthread_setschedprio F +GLIBC_2.43 pthread_yield 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 6c9ca8e1..b3afc039 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -34,7 +34,6 @@ GLIBC_2.12 pthread_spin_lock F GLIBC_2.12 pthread_spin_trylock F GLIBC_2.12 pthread_spin_unlock F GLIBC_2.12 pthread_testcancel F -GLIBC_2.12 pthread_yield F GLIBC_2.12 sem_close F GLIBC_2.12 sem_destroy F GLIBC_2.12 sem_getvalue F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 0e03d9dc..88d180fc 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1609,6 +1609,7 @@ GLIBC_2.38 pthread_setschedparam F GLIBC_2.38 pthread_setschedprio F GLIBC_2.38 pthread_setspecific F GLIBC_2.38 pthread_sigmask F +GLIBC_2.38 pthread_yield F GLIBC_2.38 ptrace F GLIBC_2.38 ptsname F GLIBC_2.38 ptsname_r F @@ -2323,6 +2324,7 @@ GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F GLIBC_2.43 pthread_setconcurrency F GLIBC_2.43 pthread_setschedprio F +GLIBC_2.43 pthread_yield 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 e68935dc..e76c359b 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -56,7 +56,6 @@ GLIBC_2.38 pthread_spin_unlock F GLIBC_2.38 pthread_testcancel F GLIBC_2.38 pthread_timedjoin_np F GLIBC_2.38 pthread_tryjoin_np F -GLIBC_2.38 pthread_yield F GLIBC_2.38 sem_clockwait F GLIBC_2.38 sem_close F GLIBC_2.38 sem_destroy F From patchwork Fri Aug 15 18:14:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 118423 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 265113858401 for ; Fri, 15 Aug 2025 18:32:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 265113858401 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=MV7fs6H7 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 B3D833858410 for ; Fri, 15 Aug 2025 18:15:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B3D833858410 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 B3D833858410 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=1755281729; cv=none; b=j93mB3CU9tABGwujscfYIzmPqaZvPUMhDONg9Uapd5pitLmhz4yjer3Ges59LWRtYYCq/2UxXv6tzkU41HNihWJKkSbovkhOpF18QNPfDD8aNiKJX3F+QvFnKK/vmi4BPGTlFjbsYK9sNoclv7o3mHVKHTKtAe8Ka1ccR0GuEp0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755281729; c=relaxed/simple; bh=9uMHsON98LUIrSEjgQVpFblbe8nDpprYemTbcgFb7DY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=VeVgJDNUEeBV8Zy6gcHrEkavkyjfqzZcAr7IuI+g0f/WjIkEFSQ6eIuLcPZaW6vJD64FRbfi7u3Zo/IITx/cqxgddo+I8Peg6uN3pmOTYa1MBEpad4qlzYYajAOjO1ZUc3W9jVxh36viJdG/x7EuqgAr5wDLKTrXLNj+xwbtXTc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B3D833858410 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id C151525D43; Fri, 15 Aug 2025 20:15:28 +0200 (CEST) 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 TpspuWvu_36x; Fri, 15 Aug 2025 20:15:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1755281728; bh=9uMHsON98LUIrSEjgQVpFblbe8nDpprYemTbcgFb7DY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=MV7fs6H75pImUM4aUcyTGaoYGoiYnYMXpBJ0p5zVahQM73xCKmG5CWpiVagWRVm3m 0i97+mseJ3xPBgn//ikXi8wfd/lk+m94A/wsucXrPGnwf/nHMEZBlT1PCz+ILn7Syr YGEOo75qfdo4e3frgqwxODL76GPyfBLXAW+apB4YZbuo91I+/D8Zi+KSOVaOVQRr8G y2ym1PVZiPptTGXavzaFtddO0SsytxOsEUYr5lS+0+xTKM5bCf+MXec9aWkTJPbttd imObUrN7SO8EmP6RJSOPwlHStCTtysGgCbhTOb278pQZMZ1KFisQ6uItnqNq1qyR3F VCSd7wVBhMXwA== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 08/19] htl: move __thread_set_pcsptp into libc. Date: Fri, 15 Aug 2025 20:14:49 +0200 Message-ID: <20250815181500.107433-9-gfleury@disroot.org> In-Reply-To: <20250815181500.107433-1-gfleury@disroot.org> References: <20250815181500.107433-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 --- htl/Makefile | 2 +- htl/Versions | 1 + sysdeps/mach/hurd/htl/pt-sysdep.h | 2 +- sysdeps/mach/hurd/i386/htl/pt-machdep.c | 2 ++ sysdeps/mach/hurd/x86_64/htl/pt-machdep.c | 2 ++ 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index ea31f9b1..92cb4ffb 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -41,7 +41,6 @@ libpthread-routines := \ pt-docancel \ pt-sysdep \ pt-setup \ - pt-machdep \ pt-spin \ pt-sigstate-init \ pt-kill \ @@ -154,6 +153,7 @@ routines := \ pt-init-specific \ pt-key-create \ pt-key-delete \ + pt-machdep \ pt-mutex-checklocked \ pt-mutex-consistent \ pt-mutex-destroy \ diff --git a/htl/Versions b/htl/Versions index e6bd1289..e5ff9186 100644 --- a/htl/Versions +++ b/htl/Versions @@ -256,6 +256,7 @@ libc { __pthread_thread_start; __pthread_thread_terminate; __pthread_wakeup; + __thread_set_pcsptp; } } diff --git a/sysdeps/mach/hurd/htl/pt-sysdep.h b/sysdeps/mach/hurd/htl/pt-sysdep.h index fb451e0c..1b727069 100644 --- a/sysdeps/mach/hurd/htl/pt-sysdep.h +++ b/sysdeps/mach/hurd/htl/pt-sysdep.h @@ -69,6 +69,6 @@ __pthread_stack_dealloc (void *stackaddr, size_t stacksize) extern int __thread_set_pcsptp (thread_t thread, int set_pc, void *pc, int set_sp, void *sp, int set_tp, void *tp); - +libc_hidden_proto (__thread_set_pcsptp) #endif /* pt-sysdep.h */ diff --git a/sysdeps/mach/hurd/i386/htl/pt-machdep.c b/sysdeps/mach/hurd/i386/htl/pt-machdep.c index fd3eb861..06c746d3 100644 --- a/sysdeps/mach/hurd/i386/htl/pt-machdep.c +++ b/sysdeps/mach/hurd/i386/htl/pt-machdep.c @@ -23,6 +23,7 @@ #include #include #include +#include #define HURD_TLS_DESC_DECL(desc, tcb) \ struct descriptor desc = \ @@ -80,3 +81,4 @@ __thread_set_pcsptp (thread_t thread, return 0; } +libc_hidden_def (__thread_set_pcsptp) diff --git a/sysdeps/mach/hurd/x86_64/htl/pt-machdep.c b/sysdeps/mach/hurd/x86_64/htl/pt-machdep.c index 9281545e..f3e3d0a1 100644 --- a/sysdeps/mach/hurd/x86_64/htl/pt-machdep.c +++ b/sysdeps/mach/hurd/x86_64/htl/pt-machdep.c @@ -24,6 +24,7 @@ #include #include #include +#include int __thread_set_pcsptp (thread_t thread, @@ -71,3 +72,4 @@ __thread_set_pcsptp (thread_t thread, return 0; } +libc_hidden_def (__thread_set_pcsptp) From patchwork Fri Aug 15 18:14:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 118424 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 7154E3858C40 for ; Fri, 15 Aug 2025 18:33:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7154E3858C40 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=L9hSN7nB 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 92220385840D for ; Fri, 15 Aug 2025 18:15:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 92220385840D 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 92220385840D 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=1755281731; cv=none; b=jkBQIWmtzP+yS0D55i8kKmUw0yP9zUmY7F/LxogDx2bI07BS6HckoeykxOSAQTDuheu6yut8JejBrm4XiVmOs4Okw7ZJ0ZMeUPeA5Y5GD3YtYHQV06syHgOP7YtElX/fihc41a3vDqONe24PTwHFf70u+0GL6JAjl69P9QIf+ck= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755281731; c=relaxed/simple; bh=nzaTa7f+pln+XN3vS+L7uuPgcgR/PFn3t1zofn18YUg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=UIY9x4EL2KgSHQUGlE1LQZ+rMrtN5VhnswNB5Hd/kmnMu1xJzfQtuPpbzrq2zUKPkvB4lQ+JSVqnplGEbYcpYgf+kvx4zd7nlMwR6z7ngwmdl5oqHBhP9ogHw3svQhRwE4xqHa6em12zLmuO8V/ovn0orBQecWG1RIx8LPylkCc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 92220385840D Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id AC76225CD8; Fri, 15 Aug 2025 20:15:30 +0200 (CEST) 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 whx8xYl2Baya; Fri, 15 Aug 2025 20:15:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1755281730; bh=nzaTa7f+pln+XN3vS+L7uuPgcgR/PFn3t1zofn18YUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=L9hSN7nBMmMbwzk3xj4p3nhO1Y+rcP5j/bXUzwA8G0ly2wPb6gUQIXbiktcxrMQ1t 5CAwem+uxxjihELSyB5+tRiWCEvKRRD/8l3+h+MYAKMUW4UVCFy73mCpJ10f/LGHNM BgzjhDCBVrQT0BOumh8F7yZI2ddkZ5BK/iSlcTiqZHS2yOrl7A2p9ogCdnSJ/Ma4BT 4lR3gqdh0ElUqG1/CoMP+zbxPK9aaH9R5+s5zDytu0KLQWgC5C2f0+au8eCoBnTL3m c0WAka3Xma1Mf7ZJ7jt8hQGZ9R/ov+98ncP0SFJ0srzXDbanfkKIUKpEoatII/lzqS 2KH7BAQ1UXxjQ== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 09/19] htl: move pthread_cancel, __pthread_do_cancel into libc. Date: Fri, 15 Aug 2025 20:14:50 +0200 Message-ID: <20250815181500.107433-10-gfleury@disroot.org> In-Reply-To: <20250815181500.107433-1-gfleury@disroot.org> References: <20250815181500.107433-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 --- htl/Makefile | 4 ++-- htl/Versions | 4 ++-- htl/pt-cancel.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, 16 insertions(+), 7 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 92cb4ffb..22ff69cb 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -33,12 +33,10 @@ libpthread-routines := \ pt-join \ pt-spin-inlines \ pt-testcancel \ - pt-cancel \ pt-mutex-transfer-np \ pt-hurd-cond-wait \ pt-hurd-cond-timedwait \ pt-startup \ - pt-docancel \ pt-sysdep \ pt-setup \ pt-spin \ @@ -130,6 +128,7 @@ routines := \ pt-barrierattr-setpshared \ pt-block \ pt-block-intr \ + pt-cancel \ pt-cleanup \ pt-cond \ pt-cond-brdcast \ @@ -146,6 +145,7 @@ routines := \ pt-condattr-setpshared \ pt-dealloc \ pt-destroy-specific \ + pt-docancel \ pt-getconcurrency \ pt-getschedparam \ pt-getspecific \ diff --git a/htl/Versions b/htl/Versions index e5ff9186..078aa8b3 100644 --- a/htl/Versions +++ b/htl/Versions @@ -37,6 +37,7 @@ libc { pthread_barrierattr_getpshared; pthread_barrierattr_init; pthread_barrierattr_setpshared; + pthread_cancel; pthread_cond_broadcast; pthread_cond_destroy; pthread_cond_init; @@ -192,6 +193,7 @@ libc { } GLIBC_2.43 { + pthread_cancel; pthread_getconcurrency; pthread_getcpuclockid; pthread_setconcurrency; @@ -283,8 +285,6 @@ libpthread { pthread_atfork; - pthread_cancel; - pthread_create; pthread_detach; pthread_exit; pthread_getattr_np; diff --git a/htl/pt-cancel.c b/htl/pt-cancel.c index b4f3a8b7..0005284f 100644 --- a/htl/pt-cancel.c +++ b/htl/pt-cancel.c @@ -19,9 +19,11 @@ #include #include +#include +#include int -pthread_cancel (pthread_t t) +__pthread_cancel (pthread_t t) { int err = 0; struct __pthread *p; @@ -60,3 +62,8 @@ pthread_cancel (pthread_t t) return err; } +versioned_symbol (libc, __pthread_cancel, pthread_cancel, GLIBC_2_43); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libpthread, __pthread_cancel, pthread_cancel, GLIBC_2_12); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 20cff5f1..1128ca24 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -58,6 +58,7 @@ GLIBC_2.12 pthread_barrierattr_destroy F GLIBC_2.12 pthread_barrierattr_getpshared F GLIBC_2.12 pthread_barrierattr_init F GLIBC_2.12 pthread_barrierattr_setpshared F +GLIBC_2.12 pthread_cancel F GLIBC_2.12 pthread_cond_broadcast F GLIBC_2.12 pthread_cond_destroy F GLIBC_2.12 pthread_cond_init F @@ -2638,6 +2639,7 @@ GLIBC_2.42 uabs F GLIBC_2.42 uimaxabs F GLIBC_2.42 ulabs F GLIBC_2.42 ullabs F +GLIBC_2.43 pthread_cancel F GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F GLIBC_2.43 pthread_setconcurrency F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index b3afc039..3c7c8d93 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -20,7 +20,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_cancel 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 88d180fc..8b5d0c88 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_barrierattr_destroy F GLIBC_2.38 pthread_barrierattr_getpshared F GLIBC_2.38 pthread_barrierattr_init F GLIBC_2.38 pthread_barrierattr_setpshared F +GLIBC_2.38 pthread_cancel F GLIBC_2.38 pthread_cond_broadcast F GLIBC_2.38 pthread_cond_clockwait F GLIBC_2.38 pthread_cond_destroy F @@ -2320,6 +2321,7 @@ GLIBC_2.42 uabs F GLIBC_2.42 uimaxabs F GLIBC_2.42 ulabs F GLIBC_2.42 ullabs F +GLIBC_2.43 pthread_cancel F GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F GLIBC_2.43 pthread_setconcurrency F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index e76c359b..f8d7ee6b 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -37,7 +37,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_cancel F GLIBC_2.38 pthread_clockjoin_np F GLIBC_2.38 pthread_create F GLIBC_2.38 pthread_detach F From patchwork Fri Aug 15 18:14:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 118416 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 919213858401 for ; Fri, 15 Aug 2025 18:23:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 919213858401 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=EnVd8Hak 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 1FCEB3858418 for ; Fri, 15 Aug 2025 18:15:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1FCEB3858418 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 1FCEB3858418 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=1755281733; cv=none; b=BpGQLm94FywOzA5aAhYH0e0EgTvvn23YLJ2H6wWRUPG3sz1ZvsndP51cvxV6p1i+ixW2zPVgJtyqXQnuHiH6golaIFN+Z3b5EeEx8bI1p7ZIQb6aXs4VLk9K8Aj4aHIPXarGjH8Eq3FCU35umZ/CmnLK/eoMDc2bQe3IGQr8Udc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755281733; c=relaxed/simple; bh=b1keuwL4zv3oMUgq/wL5/TN27IQ3mmnmQIl+ialLsSs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=nbfQPswa6chbIZSjyON8ve5hzx0hR4Y6g3OtIctp58Xe50JGildbMZ/GoknR7yoacAcpqqKsNX2FMgT28UVxd/9TbQvRhJ+WXSBNNCk9WaPit6AenY76v0w1UKBx6lWD+p3a7sfy6WwKD08D5Hxg4ECF3rsmXrxerAFbwV6skLY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1FCEB3858418 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 553A022E39; Fri, 15 Aug 2025 20:15:32 +0200 (CEST) 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 7QtUtZWid4Xs; Fri, 15 Aug 2025 20:15:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1755281731; bh=b1keuwL4zv3oMUgq/wL5/TN27IQ3mmnmQIl+ialLsSs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=EnVd8Hak6GPcXVKaBeocszO7GAr2dE1Nhbb/BFfe+6TPFlE7mW3wI4t5fubNLtFlZ CT2KSJYe/MwQb5oSgDEuH9RQ/lBhlEXD9BNvOnMCDK8U+XssUGfee2RVhHyO4i2+qh wkH4GOTSfy95wy9Gdena9HpHN7rl3up061LkQJKGytn1h/D97ZmCjF3kj6kNyXhkZG OHIveCJyHzxx00XX3VjU8KgW14SZqpmQtRppFr41Fi/v0aoYLET1gbpP68YzQJdBHm 7EZXwqdJyBRX2Ty/NeoFn4egSNqYblO8vhQWXR4KajfTGZUb75FMLT4/1KI/3hbTE+ jLxq1cgDK6iOw== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 10/19] htl: move pthread_kill into libc. Date: Fri, 15 Aug 2025 20:14:51 +0200 Message-ID: <20250815181500.107433-11-gfleury@disroot.org> In-Reply-To: <20250815181500.107433-1-gfleury@disroot.org> References: <20250815181500.107433-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 --- htl/Makefile | 2 +- htl/Versions | 6 +++--- sysdeps/hurd/htl/pt-kill.c | 9 ++++++++- sysdeps/mach/hurd/i386/libc.abilist | 3 +++ sysdeps/mach/hurd/i386/libpthread.abilist | 2 -- sysdeps/mach/hurd/x86_64/libc.abilist | 3 +++ sysdeps/mach/hurd/x86_64/libpthread.abilist | 2 -- 7 files changed, 18 insertions(+), 9 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 22ff69cb..8722e823 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -41,7 +41,6 @@ libpthread-routines := \ pt-setup \ pt-spin \ pt-sigstate-init \ - pt-kill \ pt-getname-np \ pt-setname-np \ sem_close \ @@ -153,6 +152,7 @@ routines := \ pt-init-specific \ pt-key-create \ pt-key-delete \ + pt-kill \ pt-machdep \ pt-mutex-checklocked \ pt-mutex-consistent \ diff --git a/htl/Versions b/htl/Versions index 078aa8b3..06977e67 100644 --- a/htl/Versions +++ b/htl/Versions @@ -4,6 +4,7 @@ libc { pthread_self; __pthread_get_cleanup_stack; __pthread_key_create; + __pthread_kill; __pthread_self; pthread_attr_getdetachstate; pthread_attr_getinheritsched; @@ -53,6 +54,7 @@ libc { pthread_getconcurrency; pthread_key_create; pthread_key_delete; + pthread_kill; pthread_mutex_destroy; pthread_mutex_getprioceiling; pthread_mutex_init; @@ -196,6 +198,7 @@ libc { pthread_cancel; pthread_getconcurrency; pthread_getcpuclockid; + pthread_kill; pthread_setconcurrency; pthread_setschedprio; pthread_yield; @@ -291,9 +294,6 @@ libpthread { pthread_join; - pthread_kill; - __pthread_kill; - pthread_mutex_transfer_np; pthread_testcancel; diff --git a/sysdeps/hurd/htl/pt-kill.c b/sysdeps/hurd/htl/pt-kill.c index 77be247f..f3a283f2 100644 --- a/sysdeps/hurd/htl/pt-kill.c +++ b/sysdeps/hurd/htl/pt-kill.c @@ -22,6 +22,8 @@ #include #include +#include +#include int __pthread_kill (pthread_t thread, int sig) @@ -52,4 +54,9 @@ __pthread_kill (pthread_t thread, int sig) __spin_lock (&ss->lock); return _hurd_raise_signal (ss, sig, &detail); } -strong_alias (__pthread_kill, pthread_kill) + +versioned_symbol (libc, __pthread_kill, pthread_kill, GLIBC_2_43); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libpthread, __pthread_kill, pthread_kill, GLIBC_2_12); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 1128ca24..6056958f 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -30,6 +30,7 @@ GLIBC_2.11 mkstemps F GLIBC_2.11 mkstemps64 F GLIBC_2.12 __pthread_get_cleanup_stack F GLIBC_2.12 __pthread_key_create F +GLIBC_2.12 __pthread_kill F GLIBC_2.12 __pthread_self F GLIBC_2.12 pthread_attr_destroy F GLIBC_2.12 pthread_attr_getdetachstate F @@ -78,6 +79,7 @@ GLIBC_2.12 pthread_getschedparam F GLIBC_2.12 pthread_getspecific F GLIBC_2.12 pthread_key_create F GLIBC_2.12 pthread_key_delete F +GLIBC_2.12 pthread_kill F GLIBC_2.12 pthread_mutex_destroy F GLIBC_2.12 pthread_mutex_getprioceiling F GLIBC_2.12 pthread_mutex_init F @@ -2642,6 +2644,7 @@ GLIBC_2.42 ullabs F GLIBC_2.43 pthread_cancel F GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F +GLIBC_2.43 pthread_kill F GLIBC_2.43 pthread_setconcurrency F GLIBC_2.43 pthread_setschedprio F GLIBC_2.43 pthread_yield F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 3c7c8d93..afb9e606 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -1,6 +1,5 @@ GLIBC_2.12 __mutex_lock_solid F GLIBC_2.12 __mutex_unlock_solid F -GLIBC_2.12 __pthread_kill F GLIBC_2.12 __pthread_mutex_transfer_np F GLIBC_2.12 __pthread_spin_destroy F GLIBC_2.12 __pthread_spin_init F @@ -25,7 +24,6 @@ GLIBC_2.12 pthread_detach F GLIBC_2.12 pthread_exit F GLIBC_2.12 pthread_getattr_np F GLIBC_2.12 pthread_join F -GLIBC_2.12 pthread_kill F GLIBC_2.12 pthread_mutex_transfer_np F GLIBC_2.12 pthread_spin_destroy F GLIBC_2.12 pthread_spin_init F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 8b5d0c88..b17e1980 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -393,6 +393,7 @@ GLIBC_2.38 __progname D 0x8 GLIBC_2.38 __progname_full D 0x8 GLIBC_2.38 __pthread_get_cleanup_stack F GLIBC_2.38 __pthread_key_create F +GLIBC_2.38 __pthread_kill F GLIBC_2.38 __pthread_self F GLIBC_2.38 __ptsname_r_chk F GLIBC_2.38 __pwrite64 F @@ -1561,6 +1562,7 @@ GLIBC_2.38 pthread_getschedparam F GLIBC_2.38 pthread_getspecific F GLIBC_2.38 pthread_key_create F GLIBC_2.38 pthread_key_delete F +GLIBC_2.38 pthread_kill F GLIBC_2.38 pthread_mutex_clocklock F GLIBC_2.38 pthread_mutex_consistent F GLIBC_2.38 pthread_mutex_consistent_np F @@ -2324,6 +2326,7 @@ GLIBC_2.42 ullabs F GLIBC_2.43 pthread_cancel F GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F +GLIBC_2.43 pthread_kill F GLIBC_2.43 pthread_setconcurrency F GLIBC_2.43 pthread_setschedprio F GLIBC_2.43 pthread_yield F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index f8d7ee6b..f1fef475 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -5,7 +5,6 @@ GLIBC_2.38 __errno_location F GLIBC_2.38 __h_errno_location F GLIBC_2.38 __mutex_lock_solid F GLIBC_2.38 __mutex_unlock_solid F -GLIBC_2.38 __pthread_kill F GLIBC_2.38 __pthread_mutex_transfer_np F GLIBC_2.38 __pthread_spin_destroy F GLIBC_2.38 __pthread_spin_init F @@ -45,7 +44,6 @@ GLIBC_2.38 pthread_getattr_np F GLIBC_2.38 pthread_hurd_cond_timedwait_np F GLIBC_2.38 pthread_hurd_cond_wait_np F GLIBC_2.38 pthread_join F -GLIBC_2.38 pthread_kill F GLIBC_2.38 pthread_mutex_transfer_np F GLIBC_2.38 pthread_spin_destroy F GLIBC_2.38 pthread_spin_init F From patchwork Fri Aug 15 18:14:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 118427 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 861293858D1E for ; Fri, 15 Aug 2025 18:37:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 861293858D1E 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=Oc2YZr8y 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 4A3E1385841F for ; Fri, 15 Aug 2025 18:15:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4A3E1385841F 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 4A3E1385841F 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=1755281735; cv=none; b=KNflLzC1xv1iBFjgrVvtL6hFFuMQOzC9KQ2Q/kipBwQpW/BdgwCxJ8ogEmWcK6kEM9kZ09xbuMBnwxNwTvenp8ggGQH+ji1Me/81GCLMjRoQqCZg8XxxWqP7eQ7ArLZEWdZipxx1Zat6Pf4dVxppCxgEVP24NNFy/+V7EDmYQhE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755281735; c=relaxed/simple; bh=gX55PY2/bMr71SwDMREpksYovkrLCIm0Z3+3GVqZRTU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=VmZtlJIhfLg8UHRilGsbVKsJkV2pB/E39k2dDVS/oT4l69QjnfzdYxcl+CwjML6LfDtVQQoJbHfjj3MnT/VQ+zedk1Kzv/anXDP1KCLFDS1NegcsQrtdp9frjHIl3otS4W6CudqqYDWwBDYLum+W1rrHL+fZQWWSJxfzY24ohRs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4A3E1385841F Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 5D0FC20F5F; Fri, 15 Aug 2025 20:15:34 +0200 (CEST) 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 EYSw7e_WXZ_V; Fri, 15 Aug 2025 20:15:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1755281733; bh=gX55PY2/bMr71SwDMREpksYovkrLCIm0Z3+3GVqZRTU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Oc2YZr8ytxFUdhLXL8geKqJOaw7N/qdtYd0Ri+WR85auBLUcmiU0a3AD8YBS5Spsh hJbvAX8t4sr0y+ehOmboA3YAbowR/1nFw72KqbHSWCjPWNwCguxNYQ8nv57j1iRbB8 GYG25Fr9KEN1MAHKWTTIe4kVyOBnbk7qzHbXM7CTK8IgbUFYmAQ+UfTMXd0+EkGQ39 sUMNADrXZ8dSqkHmMfMJpIRaW4sNnMeujH9ioFnu5ktkTtTGjCrTeO52poghCkfskE bb3Pz+sHgQ0dWkm2c9cvH5SpPHBfbcQhu2bXvATv5+DRWUlBNXpVuNyVDrJPsBqCo0 +ji3J9yzD4qZg== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 11/19] htl: move pthread_testcancel into libc. Date: Fri, 15 Aug 2025 20:14:52 +0200 Message-ID: <20250815181500.107433-12-gfleury@disroot.org> In-Reply-To: <20250815181500.107433-1-gfleury@disroot.org> References: <20250815181500.107433-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 --- htl/Makefile | 2 +- htl/Versions | 5 +++-- htl/pt-testcancel.c | 9 ++++++++- 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(+), 6 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 8722e823..70418324 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -32,7 +32,6 @@ libpthread-routines := \ pt-initialize \ pt-join \ pt-spin-inlines \ - pt-testcancel \ pt-mutex-transfer-np \ pt-hurd-cond-wait \ pt-hurd-cond-timedwait \ @@ -204,6 +203,7 @@ routines := \ pt-sigstate \ pt-sigstate-destroy \ pt-stack-alloc \ + pt-testcancel \ pt-timedblock \ pt-timedblock-intr \ pt-thread-alloc \ diff --git a/htl/Versions b/htl/Versions index 06977e67..0f227459 100644 --- a/htl/Versions +++ b/htl/Versions @@ -93,6 +93,7 @@ libc { pthread_setschedprio; pthread_setspecific; pthread_sigmask; + pthread_testcancel; pthread_yield; } @@ -201,6 +202,7 @@ libc { pthread_kill; pthread_setconcurrency; pthread_setschedprio; + pthread_testcancel; pthread_yield; } @@ -255,6 +257,7 @@ libc { __pthread_sigstate_destroy; __pthread_sigmask; __pthread_stack_alloc; + __pthread_testcancel; __pthread_timedblock; __pthread_timedblock_intr; __pthread_thread_alloc; @@ -296,8 +299,6 @@ libpthread { pthread_mutex_transfer_np; - pthread_testcancel; - sem_close; sem_destroy; sem_getvalue; sem_init; sem_open; sem_post; sem_timedwait; sem_trywait; sem_unlink; sem_wait; diff --git a/htl/pt-testcancel.c b/htl/pt-testcancel.c index 4eef765f..0332f6dd 100644 --- a/htl/pt-testcancel.c +++ b/htl/pt-testcancel.c @@ -20,6 +20,7 @@ #include #include +#include void __pthread_testcancel (void) @@ -34,4 +35,10 @@ __pthread_testcancel (void) if (cancelled) __pthread_exit (PTHREAD_CANCELED); } -strong_alias (__pthread_testcancel, pthread_testcancel) + +libc_hidden_def (__pthread_testcancel) +versioned_symbol (libc, __pthread_testcancel, pthread_testcancel, GLIBC_2_43); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libpthread, __pthread_testcancel, pthread_testcancel, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 1538fdee..dd9d7777 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -212,6 +212,7 @@ 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); +libc_hidden_proto (__pthread_testcancel) int __pthread_attr_init (pthread_attr_t *attr); int __pthread_condattr_init (pthread_condattr_t *attr); int __pthread_setconcurrency (int __new_level); diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 6056958f..a676cd0f 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -120,6 +120,7 @@ GLIBC_2.12 pthread_setschedparam F GLIBC_2.12 pthread_setschedprio F GLIBC_2.12 pthread_setspecific F GLIBC_2.12 pthread_sigmask F +GLIBC_2.12 pthread_testcancel F GLIBC_2.12 pthread_yield F GLIBC_2.13 __fentry__ F GLIBC_2.14 syncfs F @@ -2647,6 +2648,7 @@ GLIBC_2.43 pthread_getcpuclockid F GLIBC_2.43 pthread_kill F GLIBC_2.43 pthread_setconcurrency F GLIBC_2.43 pthread_setschedprio F +GLIBC_2.43 pthread_testcancel F GLIBC_2.43 pthread_yield 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 afb9e606..044fb1c3 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -30,7 +30,6 @@ GLIBC_2.12 pthread_spin_init F GLIBC_2.12 pthread_spin_lock F GLIBC_2.12 pthread_spin_trylock F GLIBC_2.12 pthread_spin_unlock F -GLIBC_2.12 pthread_testcancel F GLIBC_2.12 sem_close F GLIBC_2.12 sem_destroy F GLIBC_2.12 sem_getvalue F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index b17e1980..dff8eee8 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1612,6 +1612,7 @@ GLIBC_2.38 pthread_setschedparam F GLIBC_2.38 pthread_setschedprio F GLIBC_2.38 pthread_setspecific F GLIBC_2.38 pthread_sigmask F +GLIBC_2.38 pthread_testcancel F GLIBC_2.38 pthread_yield F GLIBC_2.38 ptrace F GLIBC_2.38 ptsname F @@ -2329,6 +2330,7 @@ GLIBC_2.43 pthread_getcpuclockid F GLIBC_2.43 pthread_kill F GLIBC_2.43 pthread_setconcurrency F GLIBC_2.43 pthread_setschedprio F +GLIBC_2.43 pthread_testcancel F GLIBC_2.43 pthread_yield 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 f1fef475..66f06f82 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -50,7 +50,6 @@ GLIBC_2.38 pthread_spin_init F GLIBC_2.38 pthread_spin_lock F GLIBC_2.38 pthread_spin_trylock F GLIBC_2.38 pthread_spin_unlock F -GLIBC_2.38 pthread_testcancel F GLIBC_2.38 pthread_timedjoin_np F GLIBC_2.38 pthread_tryjoin_np F GLIBC_2.38 sem_clockwait F From patchwork Fri Aug 15 18:14:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 118420 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 6706C3858CD9 for ; Fri, 15 Aug 2025 18:28:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6706C3858CD9 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=bUuewb8f 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 2629E3858CD9 for ; Fri, 15 Aug 2025 18:15:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2629E3858CD9 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 2629E3858CD9 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=1755281737; cv=none; b=FKe9TrQqYN6qxMmOw1tCRR+aQ60nQYYmNABOwnagtvikrVjC0opOfkysNXaPOzpuT5Gs7dbxmAjIgxbmRuL01aqC16S3oGKRA6qR3WjwRJsPJS0zN2dzie9xfcbCL28Zz0yTuWaghEgWp5eLifTrosChSmePFsMVaJhSUh2VUZs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755281737; c=relaxed/simple; bh=Hdz1owp0L5i7yxKpk4Bdey+6L6HyVpRTWpidShg36sg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=tn55xLBZrQKRIM5Pmb0i1aYJrnfplPhXsCXpU9QNE+TJZUdq7137Xw2BV2xhu5JsZbWYeGqlhEFgTKlh9uqS9j5KSK+P0bx+TKIydQj7ZUUXka3PlrVnxpWH4GNm2UEBjn+mnAIbEJqow30P/zyNjJ8EUbzICxsIe61LwA0MV9Y= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2629E3858CD9 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 2A92C25CD8; Fri, 15 Aug 2025 20:15:36 +0200 (CEST) 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 QrobVwjG6kIu; Fri, 15 Aug 2025 20:15:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1755281735; bh=Hdz1owp0L5i7yxKpk4Bdey+6L6HyVpRTWpidShg36sg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bUuewb8fj5xW0z39ujSBodPWjyRxQpE+l48jJPrVsFpuep13SjU5cvS9ro+H0pO3o +lhpcn6qUW7A8OsTG0W5cjshdOW18bPp+4eU4zf1QUd0j/kh2YVSF3qJCpBf3hXvcM aktKlUiiYm4XoZDRid+g2XAwv9/LuayMduFn7OGzuYZNvfUsHjjBQHvmgnh9juZFoD H3KY0e3rVnsdQ5rAwWIZcFRqyIG5Wlb4rD6W2YkhgJQMOnWU4Dafh80OKPlyp1UGVQ oPmU3tKSA+XvAiycfQHlJaixvQcNnJNSuexoNtQtMtBEyG3mqK6diN1L0EDk62LMv9 vXJowYAsu2W1A== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 12/19] htl: move pthread_getattr_np into libc. Date: Fri, 15 Aug 2025 20:14:53 +0200 Message-ID: <20250815181500.107433-13-gfleury@disroot.org> In-Reply-To: <20250815181500.107433-1-gfleury@disroot.org> References: <20250815181500.107433-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 --- htl/Makefile | 2 +- htl/Versions | 5 ++--- htl/pt-getattr.c | 9 ++++++++- sysdeps/htl/pthreadP.h | 1 + sysdeps/mach/hurd/i386/libc.abilist | 3 +++ sysdeps/mach/hurd/i386/libpthread.abilist | 1 - sysdeps/mach/hurd/x86_64/libc.abilist | 3 +++ sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 - 8 files changed, 18 insertions(+), 7 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 70418324..123bddd8 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -26,7 +26,6 @@ LCLHDRS := libpthread-routines := \ pt-create \ - pt-getattr \ pt-detach \ pt-exit \ pt-initialize \ @@ -144,6 +143,7 @@ routines := \ pt-dealloc \ pt-destroy-specific \ pt-docancel \ + pt-getattr \ pt-getconcurrency \ pt-getschedparam \ pt-getspecific \ diff --git a/htl/Versions b/htl/Versions index 0f227459..c94bd615 100644 --- a/htl/Versions +++ b/htl/Versions @@ -51,6 +51,7 @@ libc { pthread_condattr_getpshared; pthread_condattr_setclock; pthread_condattr_setpshared; + pthread_getattr_np; pthread_getconcurrency; pthread_key_create; pthread_key_delete; @@ -197,6 +198,7 @@ libc { GLIBC_2.43 { pthread_cancel; + pthread_getattr_np; pthread_getconcurrency; pthread_getcpuclockid; pthread_kill; @@ -293,8 +295,6 @@ libpthread { pthread_create; pthread_detach; pthread_exit; - pthread_getattr_np; - pthread_join; pthread_mutex_transfer_np; @@ -341,7 +341,6 @@ libpthread { __cthread_keycreate; __cthread_getspecific; __cthread_setspecific; - __pthread_getattr_np; __pthread_enable_asynccancel; __pthread_disable_asynccancel; } diff --git a/htl/pt-getattr.c b/htl/pt-getattr.c index a8515147..74b86ca7 100644 --- a/htl/pt-getattr.c +++ b/htl/pt-getattr.c @@ -21,6 +21,8 @@ #include #include +#include +#include /* Initialize thread attribute *ATTR with attributes corresponding to the already running thread THREAD. It shall be called on an uninitialized ATTR @@ -48,4 +50,9 @@ __pthread_getattr_np (pthread_t thread, pthread_attr_t *attr) return 0; } -weak_alias (__pthread_getattr_np, pthread_getattr_np) +libc_hidden_def (__pthread_getattr_np) +versioned_symbol (libc, __pthread_getattr_np, pthread_getattr_np, GLIBC_2_43); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libpthread, __pthread_getattr_np, pthread_getattr_np, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index dd9d7777..0deea22e 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -196,6 +196,7 @@ libc_hidden_proto (__pthread_key_delete) int __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)); int __pthread_getattr_np (pthread_t, pthread_attr_t *); +libc_hidden_proto (__pthread_getattr_np) int __pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr); libc_hidden_proto (__pthread_attr_getstackaddr) diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index a676cd0f..0cbff577 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -73,6 +73,7 @@ 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_getattr_np F GLIBC_2.12 pthread_getconcurrency F GLIBC_2.12 pthread_getcpuclockid F GLIBC_2.12 pthread_getschedparam F @@ -2643,6 +2644,7 @@ GLIBC_2.42 uimaxabs F GLIBC_2.42 ulabs F GLIBC_2.42 ullabs F GLIBC_2.43 pthread_cancel F +GLIBC_2.43 pthread_getattr_np F GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F GLIBC_2.43 pthread_kill F @@ -2715,6 +2717,7 @@ HURD_CTHREADS_0.3 __mutex_lock_solid F HURD_CTHREADS_0.3 __mutex_trylock F HURD_CTHREADS_0.3 __mutex_unlock F HURD_CTHREADS_0.3 __mutex_unlock_solid F +HURD_CTHREADS_0.3 __pthread_getattr_np F HURD_CTHREADS_0.3 __spin_lock F HURD_CTHREADS_0.3 __spin_lock_init F HURD_CTHREADS_0.3 __spin_lock_solid F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 044fb1c3..3d225166 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -22,7 +22,6 @@ GLIBC_2.12 pthread_atfork F GLIBC_2.12 pthread_create F GLIBC_2.12 pthread_detach F GLIBC_2.12 pthread_exit F -GLIBC_2.12 pthread_getattr_np F GLIBC_2.12 pthread_join F GLIBC_2.12 pthread_mutex_transfer_np F GLIBC_2.12 pthread_spin_destroy F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index dff8eee8..2b983e48 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1556,6 +1556,7 @@ 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_getattr_np F GLIBC_2.38 pthread_getconcurrency F GLIBC_2.38 pthread_getcpuclockid F GLIBC_2.38 pthread_getschedparam F @@ -2325,6 +2326,7 @@ GLIBC_2.42 uimaxabs F GLIBC_2.42 ulabs F GLIBC_2.42 ullabs F GLIBC_2.43 pthread_cancel F +GLIBC_2.43 pthread_getattr_np F GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F GLIBC_2.43 pthread_kill F @@ -2341,6 +2343,7 @@ HURD_CTHREADS_0.3 __mutex_lock_solid F HURD_CTHREADS_0.3 __mutex_trylock F HURD_CTHREADS_0.3 __mutex_unlock F HURD_CTHREADS_0.3 __mutex_unlock_solid F +HURD_CTHREADS_0.3 __pthread_getattr_np F HURD_CTHREADS_0.3 __spin_lock F HURD_CTHREADS_0.3 __spin_lock_init F HURD_CTHREADS_0.3 __spin_lock_solid F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index 66f06f82..cf451505 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -40,7 +40,6 @@ GLIBC_2.38 pthread_clockjoin_np F GLIBC_2.38 pthread_create F GLIBC_2.38 pthread_detach F GLIBC_2.38 pthread_exit F -GLIBC_2.38 pthread_getattr_np F GLIBC_2.38 pthread_hurd_cond_timedwait_np F GLIBC_2.38 pthread_hurd_cond_wait_np F GLIBC_2.38 pthread_join F From patchwork Fri Aug 15 18:14:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 118418 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 3D00B385842C for ; Fri, 15 Aug 2025 18:26:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D00B385842C 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=dvnsaI64 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 1C6CA385841C for ; Fri, 15 Aug 2025 18:15:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1C6CA385841C 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 1C6CA385841C 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=1755281740; cv=none; b=eX/1Cj7E9Uwg0NJL3KrJLB8ptGWlcZpSZSpATyzIgLlTBBalnz4FkEpbGbZzSzn99rZ17EVwRzvUvqhpoVRD/KdnooQObBz63YktEcD5RIUTNuFmSbZ0/HblbpkJPhh90fg/+WLscPkQwlB0J4/zZkcoVrlq9kFEuLirEgJYBrI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755281740; c=relaxed/simple; bh=U4IpuduwXUdOM+E4A1QpKEiJN9Fyu9mPNMfbdMxUtMg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=v8UoymuW2y4IFEx3j0FYlcoGcmY7hrZRImuH1oTxzVMigTLnfC4EHhBRQ0mgGbhr29uOg8FkVtlG2u7WNoNo9Q9tG3uxAswZmQ9GM9U9jaabBXM0edTK3PsEuGnNgcki/NRZJGBqdoDv527P0QVd6idx9mcK8BHWOWbRal6v8KY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1C6CA385841C Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 1192D25D86; Fri, 15 Aug 2025 20:15:39 +0200 (CEST) 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 86_rpZ5sqNJQ; Fri, 15 Aug 2025 20:15:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1755281737; bh=U4IpuduwXUdOM+E4A1QpKEiJN9Fyu9mPNMfbdMxUtMg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=dvnsaI64k0yZK3AtaVIP8goG/F0ZGsDeZaMyIBrlIusrtSI7++ejw8GTLMJl/cFD3 ExQvlgcNxyPwJ4PPEATXPmzmTTpaDDoOsLFEbEt3Oq6DdmK4SQ07SClXPwT1TNvCui 4dROmH7o0liflI8y8opfowLywgPJcGEDskYBtDNwVqXomXsOgt9eL1R0/OXoBOqTz7 iHhrJ0XDIvM7BGf4eWeWruJ6fElK2rKEc27oXRcVCe0OrLA+g/JDEYTyRJzUhr4lh+ 38GvMBYBTQyPE9quFWtMJKsCw7UqfdazS9LFwzC80HovANt075kxbwNv1q+SU3IPjs InUCFRv/agRKg== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 13/19] htl: move pthread_mutex_transfer_np into libc. Date: Fri, 15 Aug 2025 20:14:54 +0200 Message-ID: <20250815181500.107433-14-gfleury@disroot.org> In-Reply-To: <20250815181500.107433-1-gfleury@disroot.org> References: <20250815181500.107433-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 --- htl/Makefile | 2 +- htl/Versions | 7 +++---- sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c | 7 ++++++- sysdeps/mach/hurd/i386/libc.abilist | 3 +++ sysdeps/mach/hurd/i386/libpthread.abilist | 2 -- sysdeps/mach/hurd/x86_64/libc.abilist | 3 +++ sysdeps/mach/hurd/x86_64/libpthread.abilist | 2 -- 7 files changed, 16 insertions(+), 10 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 123bddd8..f83925f0 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -31,7 +31,6 @@ libpthread-routines := \ pt-initialize \ pt-join \ pt-spin-inlines \ - pt-mutex-transfer-np \ pt-hurd-cond-wait \ pt-hurd-cond-timedwait \ pt-startup \ @@ -161,6 +160,7 @@ routines := \ pt-mutex-lock \ pt-mutex-setprioceiling \ pt-mutex-timedlock \ + pt-mutex-transfer-np \ pt-mutex-trylock \ pt-mutex-unlock \ pt-mutexattr-destroy \ diff --git a/htl/Versions b/htl/Versions index c94bd615..7d0b5f21 100644 --- a/htl/Versions +++ b/htl/Versions @@ -5,6 +5,7 @@ libc { __pthread_get_cleanup_stack; __pthread_key_create; __pthread_kill; + __pthread_mutex_transfer_np; __pthread_self; pthread_attr_getdetachstate; pthread_attr_getinheritsched; @@ -62,6 +63,7 @@ libc { pthread_mutex_lock; pthread_mutex_setprioceiling; pthread_mutex_timedlock; + pthread_mutex_transfer_np; pthread_mutex_trylock; pthread_mutex_unlock; pthread_mutexattr_destroy; @@ -202,6 +204,7 @@ libc { pthread_getconcurrency; pthread_getcpuclockid; pthread_kill; + pthread_mutex_transfer_np; pthread_setconcurrency; pthread_setschedprio; pthread_testcancel; @@ -276,8 +279,6 @@ libpthread { __errno_location; __h_errno_location; } GLIBC_2.12 { - __pthread_mutex_transfer_np; - cthread_detach; cthread_fork; cthread_keycreate; @@ -297,8 +298,6 @@ libpthread { pthread_join; - pthread_mutex_transfer_np; - sem_close; sem_destroy; sem_getvalue; sem_init; sem_open; sem_post; sem_timedwait; sem_trywait; sem_unlink; sem_wait; diff --git a/sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c b/sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c index 72f83ee0..8961cb26 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c @@ -24,6 +24,8 @@ #include "pt-mutex.h" #include #include +#include +#include int __pthread_mutex_transfer_np (pthread_mutex_t *mtxp, pthread_t th) @@ -73,5 +75,8 @@ __pthread_mutex_transfer_np (pthread_mutex_t *mtxp, pthread_t th) return ret; } +versioned_symbol (libc, __pthread_mutex_transfer_np, pthread_mutex_transfer_np, GLIBC_2_43); -weak_alias (__pthread_mutex_transfer_np, pthread_mutex_transfer_np) +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libpthread, __pthread_mutex_transfer_np, pthread_mutex_transfer_np, GLIBC_2_12); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 0cbff577..e795ff5a 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_get_cleanup_stack F GLIBC_2.12 __pthread_key_create F GLIBC_2.12 __pthread_kill F +GLIBC_2.12 __pthread_mutex_transfer_np F GLIBC_2.12 __pthread_self F GLIBC_2.12 pthread_attr_destroy F GLIBC_2.12 pthread_attr_getdetachstate F @@ -87,6 +88,7 @@ GLIBC_2.12 pthread_mutex_init F GLIBC_2.12 pthread_mutex_lock F GLIBC_2.12 pthread_mutex_setprioceiling F GLIBC_2.12 pthread_mutex_timedlock F +GLIBC_2.12 pthread_mutex_transfer_np F GLIBC_2.12 pthread_mutex_trylock F GLIBC_2.12 pthread_mutex_unlock F GLIBC_2.12 pthread_mutexattr_destroy F @@ -2648,6 +2650,7 @@ GLIBC_2.43 pthread_getattr_np F GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F GLIBC_2.43 pthread_kill F +GLIBC_2.43 pthread_mutex_transfer_np F GLIBC_2.43 pthread_setconcurrency F GLIBC_2.43 pthread_setschedprio F GLIBC_2.43 pthread_testcancel F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 3d225166..bfec2a2a 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -1,6 +1,5 @@ GLIBC_2.12 __mutex_lock_solid F GLIBC_2.12 __mutex_unlock_solid F -GLIBC_2.12 __pthread_mutex_transfer_np F GLIBC_2.12 __pthread_spin_destroy F GLIBC_2.12 __pthread_spin_init F GLIBC_2.12 __pthread_spin_lock F @@ -23,7 +22,6 @@ GLIBC_2.12 pthread_create F GLIBC_2.12 pthread_detach F GLIBC_2.12 pthread_exit F GLIBC_2.12 pthread_join F -GLIBC_2.12 pthread_mutex_transfer_np F GLIBC_2.12 pthread_spin_destroy F GLIBC_2.12 pthread_spin_init F GLIBC_2.12 pthread_spin_lock F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 2b983e48..bebf9276 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -394,6 +394,7 @@ GLIBC_2.38 __progname_full D 0x8 GLIBC_2.38 __pthread_get_cleanup_stack F GLIBC_2.38 __pthread_key_create F GLIBC_2.38 __pthread_kill F +GLIBC_2.38 __pthread_mutex_transfer_np F GLIBC_2.38 __pthread_self F GLIBC_2.38 __ptsname_r_chk F GLIBC_2.38 __pwrite64 F @@ -1573,6 +1574,7 @@ GLIBC_2.38 pthread_mutex_init F GLIBC_2.38 pthread_mutex_lock F GLIBC_2.38 pthread_mutex_setprioceiling F GLIBC_2.38 pthread_mutex_timedlock F +GLIBC_2.38 pthread_mutex_transfer_np F GLIBC_2.38 pthread_mutex_trylock F GLIBC_2.38 pthread_mutex_unlock F GLIBC_2.38 pthread_mutexattr_destroy F @@ -2330,6 +2332,7 @@ GLIBC_2.43 pthread_getattr_np F GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F GLIBC_2.43 pthread_kill F +GLIBC_2.43 pthread_mutex_transfer_np F GLIBC_2.43 pthread_setconcurrency F GLIBC_2.43 pthread_setschedprio F GLIBC_2.43 pthread_testcancel F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index cf451505..9164c479 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -5,7 +5,6 @@ GLIBC_2.38 __errno_location F GLIBC_2.38 __h_errno_location F GLIBC_2.38 __mutex_lock_solid F GLIBC_2.38 __mutex_unlock_solid F -GLIBC_2.38 __pthread_mutex_transfer_np F GLIBC_2.38 __pthread_spin_destroy F GLIBC_2.38 __pthread_spin_init F GLIBC_2.38 __pthread_spin_lock F @@ -43,7 +42,6 @@ GLIBC_2.38 pthread_exit F GLIBC_2.38 pthread_hurd_cond_timedwait_np F GLIBC_2.38 pthread_hurd_cond_wait_np F GLIBC_2.38 pthread_join F -GLIBC_2.38 pthread_mutex_transfer_np F GLIBC_2.38 pthread_spin_destroy F GLIBC_2.38 pthread_spin_init F GLIBC_2.38 pthread_spin_lock F From patchwork Fri Aug 15 18:14:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 118422 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 B50383858410 for ; Fri, 15 Aug 2025 18:30:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B50383858410 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=BkKywNei 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 DD2103858D1E for ; Fri, 15 Aug 2025 18:15:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DD2103858D1E 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 DD2103858D1E 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=1755281742; cv=none; b=FlzJhtlnxDsOHLjlyZXSWQdqmx2BOOTZN0asq3coT7KZlXho1CnqbBX9NMOPqErvnbvUpN6AOCtD0J6lQwgoGqsGk5pAmZPBYgbOVH+XVgQm0kAbyY5oCZpo8ZAz4zXgKQspjmZlZgRdf3LLt1fOcGo7nTtq4gbY8nDUgwHh6j8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755281742; c=relaxed/simple; bh=IDTGku567UhEhIkHnjxXfJIb8aXCBupkh85evDmgKhM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=A+LY9CRqGmBnYglm88Niai8BqecXHlWSHDBUblBWJRiHAgUWULZpJyUICAOIwao6fkqeizOEYPAS7gGbCaYr5HH1+Vqt+FugnhkHjscdcnqaTP4TdAurSwt0jrWKlxVqpRyiitBhid7fHP5SY+FhKR1pQgxXIwha3YZGwP+GNNA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD2103858D1E Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id EBC1E25DA2; Fri, 15 Aug 2025 20:15:40 +0200 (CEST) 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 WxAYz-0RT4hG; Fri, 15 Aug 2025 20:15:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1755281738; bh=IDTGku567UhEhIkHnjxXfJIb8aXCBupkh85evDmgKhM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=BkKywNei8qLfOjc3iC7TlkOfPqP6itm4j7ySUK2cISUvlNLI1orVf3z3R7m92rrnz fP5Ef1o6DoR+3MjtrsWyQYytFgPKt9TlWM12jgTHgBw0RPgVfJAwWTrt1AjN60r8wl ibI82RyyTTVLv/cwBIXx8i2iw6uBwFk/u38i81vCjzxxKI9nBZ1TENw/VVbneupT8s rQR1eUYBTcZ2bgZtDWqRcSj5gEr6Zls02MasmqbCRc1fKrew23fdk+l/AOfXmYUkHU hMivTBggoUPLQfcdk3NwUNbJGo/6XWFjgaszStHgLMC9s+fI/zNpeESbHgrd2jxUtE OKQVMU2Vhn30w== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 14/19] htl: move __pthread_sigstate_init into libc. Date: Fri, 15 Aug 2025 20:14:55 +0200 Message-ID: <20250815181500.107433-15-gfleury@disroot.org> In-Reply-To: <20250815181500.107433-1-gfleury@disroot.org> References: <20250815181500.107433-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 --- htl/Makefile | 2 +- htl/Versions | 1 + htl/pt-internal.h | 1 + sysdeps/mach/hurd/htl/pt-sigstate-init.c | 3 +++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/htl/Makefile b/htl/Makefile index f83925f0..b2fb020a 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -37,7 +37,6 @@ libpthread-routines := \ pt-sysdep \ pt-setup \ pt-spin \ - pt-sigstate-init \ pt-getname-np \ pt-setname-np \ sem_close \ @@ -200,6 +199,7 @@ routines := \ pt-setschedprio \ pt-setspecific \ pt-sigmask \ + pt-sigstate-init \ pt-sigstate \ pt-sigstate-destroy \ pt-stack-alloc \ diff --git a/htl/Versions b/htl/Versions index 7d0b5f21..4845742f 100644 --- a/htl/Versions +++ b/htl/Versions @@ -258,6 +258,7 @@ libc { __pthread_mutexattr_settype; __pthread_once; __pthread_setspecific; + __pthread_sigstate_init; __pthread_sigstate; __pthread_sigstate_destroy; __pthread_sigmask; diff --git a/htl/pt-internal.h b/htl/pt-internal.h index 7651446b..24d0964e 100644 --- a/htl/pt-internal.h +++ b/htl/pt-internal.h @@ -311,6 +311,7 @@ libc_hidden_proto (__pthread_destroy_specific) /* Initialize newly create thread *THREAD's signal state data structures. */ extern error_t __pthread_sigstate_init (struct __pthread *thread); +libc_hidden_proto (__pthread_sigstate_init) /* Destroy the signal state data structures associated with thread *THREAD. */ diff --git a/sysdeps/mach/hurd/htl/pt-sigstate-init.c b/sysdeps/mach/hurd/htl/pt-sigstate-init.c index 5a17dd59..a0c7f277 100644 --- a/sysdeps/mach/hurd/htl/pt-sigstate-init.c +++ b/sysdeps/mach/hurd/htl/pt-sigstate-init.c @@ -19,6 +19,7 @@ #include #include #include +#include error_t __pthread_sigstate_init (struct __pthread *thread) @@ -42,3 +43,5 @@ __pthread_sigstate_init (struct __pthread *thread) return 0; } + +libc_hidden_def (__pthread_sigstate_init) From patchwork Fri Aug 15 18:14:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 118426 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 6514E3858CD9 for ; Fri, 15 Aug 2025 18:36:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6514E3858CD9 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=jlzGZcI5 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 1F6693858CDA for ; Fri, 15 Aug 2025 18:15:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1F6693858CDA 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 1F6693858CDA 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=1755281742; cv=none; b=RpdVbK/NBs5R4r2WWmMxpfmyFFr8dGMeyivtIc8kE/DAs+3LnkSlZN+wu2FQVHWGwhLrUTMhrRlCo28BfxBRxmI1aO1j9xWkW0nEbO87YfnrLPplThp25FOIHiVOBPvDO1KGZzppDvsaUOGmE6/cJfUKqLuVm8RfcJDjr1WAlrg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755281742; c=relaxed/simple; bh=JbKUtxGXc81HngrNgB/T0I/7AbWioVdXVOa93xApTuM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=gcyrfPqqrqtOh4iBnQE8pgaJxoc/4hfvXs35hyW6POunikHJyU+PBaHI0GO4VW+WMPYazCbzNWDFYlIu9w2t8lESBFSh49maZOc9JuGVCPwQcRB0XfJaUD1s1bCbTsAQntMtbIavHB2Hm8TYnKPTfxPi2UuDUcLL5qiqAA67CWU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F6693858CDA Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 4AE8C25DFA; Fri, 15 Aug 2025 20:15:41 +0200 (CEST) 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 dyjDRHpGlA3g; Fri, 15 Aug 2025 20:15:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1755281740; bh=JbKUtxGXc81HngrNgB/T0I/7AbWioVdXVOa93xApTuM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=jlzGZcI5HP3u1vaXRFHpiFyMcRQtEGM5qULfDxb0ilsrW3etN4u2oCAAOTiAngle1 S6alNRJ/6jOf480mHS+RdL1i1efcvK7UfBYZVecJPmYmCrVQSIvCSjs4VjL16suJcd VzPO8l75OR/SZMci8Qnz8wbEeSW2EznP328Y/60sHMluDkQKLgJOjJnAJTYQaC23xc vVTancUtm9lHmQvAChj9JCVNXiJMywOFibBRtA24cZRbkdbf1UzcahwbEq0jzLFF0W 4qNgyisr7psKA4sb1XVVRDkzYFD7X/VtY9jumfvtOeEhGIXYVjgNT7tR5O+vSUAhXB 6Rbb3bVCfEW8A== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 15/19] htl: move pthread_detach into libc. Date: Fri, 15 Aug 2025 20:14:56 +0200 Message-ID: <20250815181500.107433-16-gfleury@disroot.org> In-Reply-To: <20250815181500.107433-1-gfleury@disroot.org> References: <20250815181500.107433-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 --- htl/Makefile | 2 +- htl/Versions | 5 +++-- htl/pt-detach.c | 10 ++++++++-- sysdeps/htl/pthreadP.h | 2 +- sysdeps/mach/hurd/i386/libc.abilist | 3 +++ sysdeps/mach/hurd/i386/libpthread.abilist | 1 - sysdeps/mach/hurd/x86_64/libc.abilist | 3 +++ sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 - 8 files changed, 19 insertions(+), 8 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index b2fb020a..b9780073 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -26,7 +26,6 @@ LCLHDRS := libpthread-routines := \ pt-create \ - pt-detach \ pt-exit \ pt-initialize \ pt-join \ @@ -140,6 +139,7 @@ routines := \ pt-condattr-setpshared \ pt-dealloc \ pt-destroy-specific \ + pt-detach \ pt-docancel \ pt-getattr \ pt-getconcurrency \ diff --git a/htl/Versions b/htl/Versions index 4845742f..322c09f9 100644 --- a/htl/Versions +++ b/htl/Versions @@ -52,6 +52,7 @@ libc { pthread_condattr_getpshared; pthread_condattr_setclock; pthread_condattr_setpshared; + pthread_detach; pthread_getattr_np; pthread_getconcurrency; pthread_key_create; @@ -200,6 +201,7 @@ libc { GLIBC_2.43 { pthread_cancel; + pthread_detach; pthread_getattr_np; pthread_getconcurrency; pthread_getcpuclockid; @@ -295,7 +297,7 @@ libpthread { pthread_atfork; - pthread_create; pthread_detach; pthread_exit; + pthread_create; pthread_exit; pthread_join; @@ -336,7 +338,6 @@ libpthread { __cthread_detach; __cthread_fork; - __pthread_detach; __pthread_create; __cthread_keycreate; __cthread_getspecific; diff --git a/htl/pt-detach.c b/htl/pt-detach.c index a29b68b4..f0d43af7 100644 --- a/htl/pt-detach.c +++ b/htl/pt-detach.c @@ -21,6 +21,8 @@ #include #include +#include +#include /* Indicate that the storage for THREAD can be reclaimed when it terminates. */ @@ -71,5 +73,9 @@ __pthread_detach (pthread_t thread) return err; } -weak_alias (__pthread_detach, pthread_detach) -hidden_def (__pthread_detach) +libc_hidden_def (__pthread_detach) +versioned_symbol (libc, __pthread_detach, pthread_detach, GLIBC_2_43); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libpthread, __pthread_detach, pthread_detach, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 0deea22e..98850e9f 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -180,6 +180,7 @@ int __pthread_create (pthread_t *newthread, void __cthread_detach (__cthread_t); int __pthread_detach (pthread_t __threadp); +libc_hidden_proto (__pthread_detach) void __pthread_exit (void *value) __attribute__ ((__noreturn__)); int __pthread_join (pthread_t, void **); int __cthread_keycreate (__cthread_key_t *); @@ -230,7 +231,6 @@ libc_hidden_proto (__pthread_get_cleanup_stack) #if IS_IN (libpthread) hidden_proto (__pthread_create) -hidden_proto (__pthread_detach) #endif #if !defined(__NO_WEAK_PTHREAD_ALIASES) && !IS_IN (libpthread) diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index e795ff5a..da2ad4ae 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -73,6 +73,7 @@ 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_detach F GLIBC_2.12 pthread_equal F GLIBC_2.12 pthread_getattr_np F GLIBC_2.12 pthread_getconcurrency F @@ -2646,6 +2647,7 @@ GLIBC_2.42 uimaxabs F GLIBC_2.42 ulabs F GLIBC_2.42 ullabs F GLIBC_2.43 pthread_cancel F +GLIBC_2.43 pthread_detach F GLIBC_2.43 pthread_getattr_np F GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F @@ -2720,6 +2722,7 @@ HURD_CTHREADS_0.3 __mutex_lock_solid F HURD_CTHREADS_0.3 __mutex_trylock F HURD_CTHREADS_0.3 __mutex_unlock F HURD_CTHREADS_0.3 __mutex_unlock_solid F +HURD_CTHREADS_0.3 __pthread_detach F HURD_CTHREADS_0.3 __pthread_getattr_np F HURD_CTHREADS_0.3 __spin_lock F HURD_CTHREADS_0.3 __spin_lock_init F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index bfec2a2a..094f7de2 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -19,7 +19,6 @@ GLIBC_2.12 ftrylockfile F GLIBC_2.12 funlockfile F GLIBC_2.12 pthread_atfork F GLIBC_2.12 pthread_create F -GLIBC_2.12 pthread_detach F GLIBC_2.12 pthread_exit F GLIBC_2.12 pthread_join F GLIBC_2.12 pthread_spin_destroy F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index bebf9276..2e7e0077 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1555,6 +1555,7 @@ 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_detach F GLIBC_2.38 pthread_equal F GLIBC_2.38 pthread_exit F GLIBC_2.38 pthread_getattr_np F @@ -2328,6 +2329,7 @@ GLIBC_2.42 uimaxabs F GLIBC_2.42 ulabs F GLIBC_2.42 ullabs F GLIBC_2.43 pthread_cancel F +GLIBC_2.43 pthread_detach F GLIBC_2.43 pthread_getattr_np F GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F @@ -2346,6 +2348,7 @@ HURD_CTHREADS_0.3 __mutex_lock_solid F HURD_CTHREADS_0.3 __mutex_trylock F HURD_CTHREADS_0.3 __mutex_unlock F HURD_CTHREADS_0.3 __mutex_unlock_solid F +HURD_CTHREADS_0.3 __pthread_detach F HURD_CTHREADS_0.3 __pthread_getattr_np F HURD_CTHREADS_0.3 __spin_lock F HURD_CTHREADS_0.3 __spin_lock_init F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index 9164c479..926d31b9 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -37,7 +37,6 @@ GLIBC_2.38 mtx_trylock F GLIBC_2.38 mtx_unlock F GLIBC_2.38 pthread_clockjoin_np F GLIBC_2.38 pthread_create F -GLIBC_2.38 pthread_detach F GLIBC_2.38 pthread_exit F GLIBC_2.38 pthread_hurd_cond_timedwait_np F GLIBC_2.38 pthread_hurd_cond_wait_np F From patchwork Fri Aug 15 18:14:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 118428 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 0FF0D3858412 for ; Fri, 15 Aug 2025 18:40:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0FF0D3858412 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=GMKNz/Pz 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 363803858415 for ; Fri, 15 Aug 2025 18:15:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 363803858415 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 363803858415 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=1755281744; cv=none; b=AYado+W+tQAEM/JW41U9DoKUn4mzcQm0gzSX4yWzOdkUFH93H9H0tR+pkmPS0xSXL69spkpBquUw1xkrcoK5AkaPmVndEkMn5NEM3ZXt0G1V89+2kjZN/xXZfLBZ/X+qKgehADx/QDIgAxFC+ZtZ8eQGKPRKBH8QMgEGfVven5k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755281744; c=relaxed/simple; bh=H46dUwYg59l8eHP3aobbNP1XCU6bTuCMyu1FpAQ4Fkw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=hrIAFzDlFbw0mXPsM7OevrL8/he5SrQPLIK5KO1DLmDY8w5VOOIidupk5ewWD8k5lIA/YF4x+BNmuUQnvO/8me51h4kAeqbqdT8J5LLKamypcHNbezU/2sIZYNYTGi7XR8dc/EePzu18ik5nSUVIJcFI2LI2Z73ci2YQstih4Sc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 363803858415 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 503A125CD8; Fri, 15 Aug 2025 20:15:43 +0200 (CEST) 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 xtxzvt4qqnOx; Fri, 15 Aug 2025 20:15:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1755281742; bh=H46dUwYg59l8eHP3aobbNP1XCU6bTuCMyu1FpAQ4Fkw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=GMKNz/PzjUJBcRmj3tY90lILmjGw9WVY7UDf9ymf8SLBA7OmNomWfsu26F18mpVnj d1BewU4zAP3BK6nKSCtFFkA82e4s5vGtv8sB5JfzTDhfha7aZjIfuBUUi+XmFq8xLP VWIXPDmJbg07fbqVQ+mLsVGpJk6IZE6flt9UCylSt5WruC50sYoZPoABODzNOHGndH +J26AAeYwzwv2ZxzczW2enG4f00iSnsfW5U+KZE9lOelm+mGgeBdWtSQXDx6dNp9n6 RZAKVRRbtqIMYCute9CDidu9uEz/7r0zeNilMxWjOk4j7ec/y4C3MbmhuD+vosg/oF qpj3a+axQH/OQ== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 16/19] htl: move pthread_exit into libc. Date: Fri, 15 Aug 2025 20:14:57 +0200 Message-ID: <20250815181500.107433-17-gfleury@disroot.org> In-Reply-To: <20250815181500.107433-1-gfleury@disroot.org> References: <20250815181500.107433-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 --- htl/Makefile | 2 +- htl/Versions | 4 ++- htl/forward.c | 30 --------------------- htl/pt-exit.c | 9 +++++-- htl/pt-initialize.c | 1 - htl/pt-setcancelstate.c | 2 +- htl/pt-setcanceltype.c | 2 +- sysdeps/htl/pthread-functions.h | 3 --- sysdeps/htl/pthreadP.h | 9 +------ sysdeps/mach/hurd/i386/libc.abilist | 1 + sysdeps/mach/hurd/i386/libpthread.abilist | 1 - sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 - 12 files changed, 15 insertions(+), 50 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index b9780073..3995ee2e 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -26,7 +26,6 @@ LCLHDRS := libpthread-routines := \ pt-create \ - pt-exit \ pt-initialize \ pt-join \ pt-spin-inlines \ @@ -141,6 +140,7 @@ routines := \ pt-destroy-specific \ pt-detach \ pt-docancel \ + pt-exit \ pt-getattr \ pt-getconcurrency \ pt-getschedparam \ diff --git a/htl/Versions b/htl/Versions index 322c09f9..44af006b 100644 --- a/htl/Versions +++ b/htl/Versions @@ -58,6 +58,7 @@ libc { pthread_key_create; pthread_key_delete; pthread_kill; + pthread_exit; pthread_mutex_destroy; pthread_mutex_getprioceiling; pthread_mutex_init; @@ -245,6 +246,7 @@ libc { __pthread_condattr_init; __pthread_default_condattr; __pthread_destroy_specific; + __pthread_exit; __pthread_getspecific; __pthread_key_delete; __pthread_max_threads; @@ -297,7 +299,7 @@ libpthread { pthread_atfork; - pthread_create; pthread_exit; + pthread_create; pthread_join; diff --git a/htl/forward.c b/htl/forward.c index 21acf664..9294d257 100644 --- a/htl/forward.c +++ b/htl/forward.c @@ -27,33 +27,3 @@ /* Pointers to the libc functions. */ struct pthread_functions __libc_pthread_functions attribute_hidden; int __libc_pthread_functions_init attribute_hidden; - - -#define FORWARD2(name, rettype, decl, params, defaction) \ -rettype \ -name decl \ -{ \ - if (!__libc_pthread_functions_init) \ - defaction; \ - \ - return PTHFCT_CALL (ptr_##name, params); \ -} - -/* Same as FORWARD2, only without return. */ -#define FORWARD_NORETURN(name, rettype, decl, params, defaction) \ -rettype \ -name decl \ -{ \ - if (!__libc_pthread_functions_init) \ - defaction; \ - \ - PTHFCT_CALL (ptr_##name, params); \ -} - -#define FORWARD(name, decl, params, defretval) \ - FORWARD2 (name, int, decl, params, return defretval) - -/* Use an alias to avoid warning, as pthread_exit is declared noreturn. */ -FORWARD_NORETURN (__pthread_exit, void, (void *retval), (retval), - exit (EXIT_SUCCESS)) -strong_alias (__pthread_exit, pthread_exit); diff --git a/htl/pt-exit.c b/htl/pt-exit.c index 2aba0433..9d331d0d 100644 --- a/htl/pt-exit.c +++ b/htl/pt-exit.c @@ -25,7 +25,7 @@ #include #include - +#include /* Terminate the current thread and make STATUS available to any thread that might join it. */ @@ -112,4 +112,9 @@ __pthread_exit (void *status) abort (); } -weak_alias (__pthread_exit, pthread_exit); +libc_hidden_def (__pthread_exit) +versioned_symbol (libc, __pthread_exit, pthread_exit, GLIBC_2_21); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21) +compat_symbol (libpthread, __pthread_exit, pthread_exit, GLIBC_2_12); +#endif diff --git a/htl/pt-initialize.c b/htl/pt-initialize.c index b4e8b15b..a4e49edf 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_exit = __pthread_exit, .ptr__IO_flockfile = _cthreads_flockfile, .ptr__IO_funlockfile = _cthreads_funlockfile, .ptr__IO_ftrylockfile = _cthreads_ftrylockfile, diff --git a/htl/pt-setcancelstate.c b/htl/pt-setcancelstate.c index 0d5692e6..d1f14de8 100644 --- a/htl/pt-setcancelstate.c +++ b/htl/pt-setcancelstate.c @@ -45,7 +45,7 @@ __pthread_setcancelstate (int state, int *oldstate) p->cancel_pending = 2; __pthread_mutex_unlock (&p->cancel_lock); - if (cancelled && __pthread_exit) + if (cancelled) __pthread_exit (PTHREAD_CANCELED); return 0; diff --git a/htl/pt-setcanceltype.c b/htl/pt-setcanceltype.c index b33931c4..73aac5fd 100644 --- a/htl/pt-setcanceltype.c +++ b/htl/pt-setcanceltype.c @@ -42,7 +42,7 @@ __pthread_setcanceltype (int type, int *oldtype) cancelled = (p->cancel_state == PTHREAD_CANCEL_ENABLE) && p->cancel_pending && (p->cancel_type == PTHREAD_CANCEL_ASYNCHRONOUS); __pthread_mutex_unlock (&p->cancel_lock); - if (cancelled && __pthread_exit) + if (cancelled) __pthread_exit (PTHREAD_CANCELED); return 0; diff --git a/sysdeps/htl/pthread-functions.h b/sysdeps/htl/pthread-functions.h index aec13a60..1fde0aea 100644 --- a/sysdeps/htl/pthread-functions.h +++ b/sysdeps/htl/pthread-functions.h @@ -21,8 +21,6 @@ #include -void __pthread_exit (void *) __attribute__ ((__noreturn__)); - void _cthreads_flockfile (FILE *); void _cthreads_funlockfile (FILE *); int _cthreads_ftrylockfile (FILE *); @@ -32,7 +30,6 @@ int _cthreads_ftrylockfile (FILE *); so if possible avoid breaking it and append new hooks to the end. */ struct pthread_functions { - void (*ptr___pthread_exit) (void *) __attribute__ ((__noreturn__)); void (*ptr__IO_flockfile) (FILE *); void (*ptr__IO_funlockfile) (FILE *); int (*ptr__IO_ftrylockfile) (FILE *); diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 98850e9f..e0f0f7d4 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -182,6 +182,7 @@ void __cthread_detach (__cthread_t); int __pthread_detach (pthread_t __threadp); libc_hidden_proto (__pthread_detach) void __pthread_exit (void *value) __attribute__ ((__noreturn__)); +libc_hidden_proto (__pthread_exit) int __pthread_join (pthread_t, void **); int __cthread_keycreate (__cthread_key_t *); int __cthread_getspecific (__cthread_key_t, void **); @@ -233,14 +234,6 @@ libc_hidden_proto (__pthread_get_cleanup_stack) hidden_proto (__pthread_create) #endif -#if !defined(__NO_WEAK_PTHREAD_ALIASES) && !IS_IN (libpthread) -# ifdef weak_extern -weak_extern (__pthread_exit) -# else -# pragma weak __pthread_exit -# endif -#endif - #define ASSERT_TYPE_SIZE(type, size) \ _Static_assert (sizeof (type) == size, \ "sizeof (" #type ") != " #size) diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index da2ad4ae..2ec557b2 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -75,6 +75,7 @@ GLIBC_2.12 pthread_condattr_setclock F GLIBC_2.12 pthread_condattr_setpshared F GLIBC_2.12 pthread_detach F GLIBC_2.12 pthread_equal F +GLIBC_2.12 pthread_exit F GLIBC_2.12 pthread_getattr_np F GLIBC_2.12 pthread_getconcurrency F GLIBC_2.12 pthread_getcpuclockid F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 094f7de2..3f3c17c1 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -19,7 +19,6 @@ GLIBC_2.12 ftrylockfile F GLIBC_2.12 funlockfile F GLIBC_2.12 pthread_atfork F GLIBC_2.12 pthread_create F -GLIBC_2.12 pthread_exit F GLIBC_2.12 pthread_join F GLIBC_2.12 pthread_spin_destroy F GLIBC_2.12 pthread_spin_init F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index 926d31b9..6dfca3f4 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -37,7 +37,6 @@ GLIBC_2.38 mtx_trylock F GLIBC_2.38 mtx_unlock F GLIBC_2.38 pthread_clockjoin_np F GLIBC_2.38 pthread_create F -GLIBC_2.38 pthread_exit F GLIBC_2.38 pthread_hurd_cond_timedwait_np F GLIBC_2.38 pthread_hurd_cond_wait_np F GLIBC_2.38 pthread_join F From patchwork Fri Aug 15 18:14:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 118431 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 351D23858023 for ; Fri, 15 Aug 2025 18:46:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 351D23858023 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (2048-bit key, secure) header.d=disroot.org header.i=@disroot.org header.a=rsa-sha256 header.s=mail header.b=bi2+ebe4 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 319CD3858425 for ; Fri, 15 Aug 2025 18:15:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 319CD3858425 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 319CD3858425 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=1755281746; cv=none; b=X3xcxp4nvSmvQBesQXAxxId3YxsoLxZcAjWz5p67eFrhBaB/LByEF19A+xc2lnvsNOXTOkxN9Kn7AcXfCucrEByP4FxtpCFTsq2EH40E+X1RoC4S2wqSK775O9a4x1ILQzaHSzQqLG24SPRa0dAgCVAPUxvSTkFl1XZpOxMD3dE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755281746; c=relaxed/simple; bh=gVG7YhEDdH5TyfRU4P2W6G5jSJHA7KRETx70MR2NBuE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=g88ovoI6Vvtls8442W7SUylX7Yd5WtSsjY/awNwDTI8Uox2TuxASjIIpUo7T91vEaXi9SJgdj6HN7k8PHTpsogp0dOwj/4mwX11j0+rpN0ZDUGNrG45E3CG437YPZB3d3ZW03NQhWAh2qcYbpsCd0ODScnnefsMMze8qQBn93JI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 319CD3858425 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 60FE120CA3; Fri, 15 Aug 2025 20:15:45 +0200 (CEST) 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 wY5OtM16QZP6; Fri, 15 Aug 2025 20:15:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1755281744; bh=gVG7YhEDdH5TyfRU4P2W6G5jSJHA7KRETx70MR2NBuE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bi2+ebe43d9vbTCZeie3rF/7lSxF2m9r6ObSpm9kxs5pPSs4De2wG04cQeUgCpVVu M42vwb9MCWiQnm0HqlVK3dWQyFKzJlT/55NsYD655LNZIqoUa6bxbJqwgKS+sbm9yY cKazX1zVbw1au/jC8nHS0KVyS1fN2D+3e82Hb/iSLKU6n9dEUXiawN570LO1MaRZvM 0ASMoC0fY3FzsGfaA/jk1sXJZ97WNFDPrwd9TYZaGAle98TkGhe4NibIFt1TwApMuM FeY4jwx23PDrGD/4XJq/kPwdAwLXPuMSmXWYjMHJ30vghik4MdsP1QhH5ltsw3llR2 3yoUb/eMd89YQ== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 17/19] htl: move pthread_{join, clockjoin_np, timedjoin_np, tryjoin_np} into libc. Date: Fri, 15 Aug 2025 20:14:58 +0200 Message-ID: <20250815181500.107433-18-gfleury@disroot.org> In-Reply-To: <20250815181500.107433-1-gfleury@disroot.org> References: <20250815181500.107433-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 --- htl/Makefile | 2 +- htl/Versions | 12 ++++++--- htl/pt-join.c | 30 ++++++++++++++++++--- sysdeps/htl/pthreadP.h | 10 +++++++ sysdeps/mach/hurd/i386/libc.abilist | 8 ++++++ sysdeps/mach/hurd/i386/libpthread.abilist | 4 --- sysdeps/mach/hurd/x86_64/libc.abilist | 8 ++++++ sysdeps/mach/hurd/x86_64/libpthread.abilist | 4 --- 8 files changed, 61 insertions(+), 17 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 3995ee2e..dfab099e 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -27,7 +27,6 @@ LCLHDRS := libpthread-routines := \ pt-create \ pt-initialize \ - pt-join \ pt-spin-inlines \ pt-hurd-cond-wait \ pt-hurd-cond-timedwait \ @@ -147,6 +146,7 @@ routines := \ pt-getspecific \ pt-getcpuclockid \ pt-init-specific \ + pt-join \ pt-key-create \ pt-key-delete \ pt-kill \ diff --git a/htl/Versions b/htl/Versions index 44af006b..1c7e82c1 100644 --- a/htl/Versions +++ b/htl/Versions @@ -55,6 +55,7 @@ libc { pthread_detach; pthread_getattr_np; pthread_getconcurrency; + pthread_join; pthread_key_create; pthread_key_delete; pthread_kill; @@ -129,6 +130,7 @@ libc { thrd_current; thrd_equal; thrd_sleep; thrd_yield; pthread_cond_clockwait; + pthread_clockjoin_np; pthread_mutex_clocklock; @@ -138,6 +140,7 @@ libc { pthread_mutexattr_setrobust; pthread_mutexattr_setrobust_np; pthread_rwlock_clockrdlock; pthread_rwlock_clockwrlock; + pthread_timedjoin_np; pthread_tryjoin_np; } GLIBC_2.41 { @@ -202,15 +205,19 @@ libc { GLIBC_2.43 { pthread_cancel; + pthread_clockjoin_np; pthread_detach; pthread_getattr_np; pthread_getconcurrency; pthread_getcpuclockid; + pthread_join; pthread_kill; pthread_mutex_transfer_np; pthread_setconcurrency; pthread_setschedprio; pthread_testcancel; + pthread_timedjoin_np; + pthread_tryjoin_np; pthread_yield; } @@ -248,6 +255,7 @@ libc { __pthread_destroy_specific; __pthread_exit; __pthread_getspecific; + __pthread_join; __pthread_key_delete; __pthread_max_threads; __pthread_mutex_checklocked; @@ -301,8 +309,6 @@ libpthread { pthread_create; - pthread_join; - sem_close; sem_destroy; sem_getvalue; sem_init; sem_open; sem_post; sem_timedwait; sem_trywait; sem_unlink; sem_wait; @@ -325,8 +331,6 @@ libpthread { cnd_broadcast; cnd_destroy; cnd_init; cnd_signal; cnd_timedwait; cnd_wait; tss_create; tss_delete; tss_get; tss_set; - pthread_tryjoin_np; pthread_timedjoin_np; pthread_clockjoin_np; - sem_clockwait; } diff --git a/htl/pt-join.c b/htl/pt-join.c index 4e4798a4..7a8da018 100644 --- a/htl/pt-join.c +++ b/htl/pt-join.c @@ -21,6 +21,8 @@ #include #include +#include +#include /* Make calling thread wait for termination of thread THREAD. Return the exit status of the thread in *STATUS. */ @@ -96,14 +98,24 @@ __pthread_join (pthread_t thread, void **status) { return __pthread_join_common (thread, status, 0, CLOCK_REALTIME, NULL); } -weak_alias (__pthread_join, pthread_join); +libc_hidden_def (__pthread_join) +versioned_symbol (libc, __pthread_join, pthread_join, GLIBC_2_43); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libc, __pthread_join, pthread_join, GLIBC_2_12); +#endif int __pthread_tryjoin_np (pthread_t thread, void **status) { return __pthread_join_common (thread, status, 1, CLOCK_REALTIME, NULL); } -weak_alias (__pthread_tryjoin_np, pthread_tryjoin_np); +libc_hidden_def (__pthread_tryjoin_np) +versioned_symbol (libc, __pthread_tryjoin_np, pthread_tryjoin_np, GLIBC_2_43); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_32, GLIBC_2_43) +compat_symbol (libc, __pthread_tryjoin_np, pthread_tryjoin_np, GLIBC_2_32); +#endif int __pthread_timedjoin_np (pthread_t thread, void **status, @@ -111,7 +123,12 @@ __pthread_timedjoin_np (pthread_t thread, void **status, { return __pthread_join_common (thread, status, 0, CLOCK_REALTIME, abstime); } -weak_alias (__pthread_timedjoin_np, pthread_timedjoin_np); +libc_hidden_def (__pthread_timedjoin_np) +versioned_symbol (libc, __pthread_timedjoin_np, pthread_timedjoin_np, GLIBC_2_43); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_32, GLIBC_2_43) +compat_symbol (libc, __pthread_timedjoin_np, pthread_timedjoin_np, GLIBC_2_32); +#endif int __pthread_clockjoin_np (pthread_t thread, void **status, @@ -120,4 +137,9 @@ __pthread_clockjoin_np (pthread_t thread, void **status, { return __pthread_join_common (thread, status, 0, clockid, abstime); } -weak_alias (__pthread_clockjoin_np, pthread_clockjoin_np); +libc_hidden_def (__pthread_clockjoin_np) +versioned_symbol (libc, __pthread_clockjoin_np, pthread_clockjoin_np, GLIBC_2_43); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_32, GLIBC_2_43) +compat_symbol (libc, __pthread_clockjoin_np, pthread_clockjoin_np, GLIBC_2_32); +#endif diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index e0f0f7d4..9273a588 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -184,6 +184,16 @@ libc_hidden_proto (__pthread_detach) void __pthread_exit (void *value) __attribute__ ((__noreturn__)); libc_hidden_proto (__pthread_exit) int __pthread_join (pthread_t, void **); +libc_hidden_proto (__pthread_join) +int __pthread_tryjoin_np (pthread_t __th, void **__thread_return); +libc_hidden_proto (__pthread_tryjoin_np) +int __pthread_timedjoin_np (pthread_t __th, void **__thread_return, + const struct timespec *__abstime); +libc_hidden_proto (__pthread_timedjoin_np) +int __pthread_clockjoin_np (pthread_t __th, void **__thread_return, + clockid_t __clockid, + const struct timespec *__abstime); +libc_hidden_proto (__pthread_clockjoin_np) int __cthread_keycreate (__cthread_key_t *); int __cthread_getspecific (__cthread_key_t, void **); int __cthread_setspecific (__cthread_key_t, void *); diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 2ec557b2..1e545481 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -81,6 +81,7 @@ GLIBC_2.12 pthread_getconcurrency F GLIBC_2.12 pthread_getcpuclockid F GLIBC_2.12 pthread_getschedparam F GLIBC_2.12 pthread_getspecific F +GLIBC_2.12 pthread_join F GLIBC_2.12 pthread_key_create F GLIBC_2.12 pthread_key_delete F GLIBC_2.12 pthread_kill F @@ -2313,6 +2314,7 @@ GLIBC_2.30 twalk_r F GLIBC_2.32 __libc_single_threaded D 0x1 GLIBC_2.32 mach_print F GLIBC_2.32 mremap F +GLIBC_2.32 pthread_clockjoin_np F GLIBC_2.32 pthread_cond_clockwait F GLIBC_2.32 pthread_mutex_clocklock F GLIBC_2.32 pthread_mutex_consistent F @@ -2323,6 +2325,8 @@ GLIBC_2.32 pthread_mutexattr_setrobust F GLIBC_2.32 pthread_mutexattr_setrobust_np F GLIBC_2.32 pthread_rwlock_clockrdlock F GLIBC_2.32 pthread_rwlock_clockwrlock F +GLIBC_2.32 pthread_timedjoin_np F +GLIBC_2.32 pthread_tryjoin_np F GLIBC_2.32 sigabbrev_np F GLIBC_2.32 sigdescr_np F GLIBC_2.32 strerrordesc_np F @@ -2648,15 +2652,19 @@ GLIBC_2.42 uimaxabs F GLIBC_2.42 ulabs F GLIBC_2.42 ullabs F GLIBC_2.43 pthread_cancel F +GLIBC_2.43 pthread_clockjoin_np F GLIBC_2.43 pthread_detach F GLIBC_2.43 pthread_getattr_np F GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F +GLIBC_2.43 pthread_join F GLIBC_2.43 pthread_kill F GLIBC_2.43 pthread_mutex_transfer_np F GLIBC_2.43 pthread_setconcurrency F GLIBC_2.43 pthread_setschedprio F GLIBC_2.43 pthread_testcancel F +GLIBC_2.43 pthread_timedjoin_np F +GLIBC_2.43 pthread_tryjoin_np F GLIBC_2.43 pthread_yield 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 3f3c17c1..8a056c89 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -19,7 +19,6 @@ GLIBC_2.12 ftrylockfile F GLIBC_2.12 funlockfile F GLIBC_2.12 pthread_atfork F GLIBC_2.12 pthread_create F -GLIBC_2.12 pthread_join F GLIBC_2.12 pthread_spin_destroy F GLIBC_2.12 pthread_spin_init F GLIBC_2.12 pthread_spin_lock F @@ -55,9 +54,6 @@ GLIBC_2.32 mtx_lock F GLIBC_2.32 mtx_timedlock F GLIBC_2.32 mtx_trylock F GLIBC_2.32 mtx_unlock F -GLIBC_2.32 pthread_clockjoin_np F -GLIBC_2.32 pthread_timedjoin_np F -GLIBC_2.32 pthread_tryjoin_np F GLIBC_2.32 sem_clockwait F GLIBC_2.32 thrd_create F GLIBC_2.32 thrd_detach F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 2e7e0077..1bf1bcab 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_barrierattr_getpshared F GLIBC_2.38 pthread_barrierattr_init F GLIBC_2.38 pthread_barrierattr_setpshared F GLIBC_2.38 pthread_cancel F +GLIBC_2.38 pthread_clockjoin_np F GLIBC_2.38 pthread_cond_broadcast F GLIBC_2.38 pthread_cond_clockwait F GLIBC_2.38 pthread_cond_destroy F @@ -1563,6 +1564,7 @@ GLIBC_2.38 pthread_getconcurrency F GLIBC_2.38 pthread_getcpuclockid F GLIBC_2.38 pthread_getschedparam F GLIBC_2.38 pthread_getspecific F +GLIBC_2.38 pthread_join F GLIBC_2.38 pthread_key_create F GLIBC_2.38 pthread_key_delete F GLIBC_2.38 pthread_kill F @@ -1617,6 +1619,8 @@ GLIBC_2.38 pthread_setschedprio F GLIBC_2.38 pthread_setspecific F GLIBC_2.38 pthread_sigmask F GLIBC_2.38 pthread_testcancel F +GLIBC_2.38 pthread_timedjoin_np F +GLIBC_2.38 pthread_tryjoin_np F GLIBC_2.38 pthread_yield F GLIBC_2.38 ptrace F GLIBC_2.38 ptsname F @@ -2329,15 +2333,19 @@ GLIBC_2.42 uimaxabs F GLIBC_2.42 ulabs F GLIBC_2.42 ullabs F GLIBC_2.43 pthread_cancel F +GLIBC_2.43 pthread_clockjoin_np F GLIBC_2.43 pthread_detach F GLIBC_2.43 pthread_getattr_np F GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F +GLIBC_2.43 pthread_join F GLIBC_2.43 pthread_kill F GLIBC_2.43 pthread_mutex_transfer_np F GLIBC_2.43 pthread_setconcurrency F GLIBC_2.43 pthread_setschedprio F GLIBC_2.43 pthread_testcancel F +GLIBC_2.43 pthread_timedjoin_np F +GLIBC_2.43 pthread_tryjoin_np F GLIBC_2.43 pthread_yield 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 6dfca3f4..5caa7bcf 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -35,18 +35,14 @@ 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_clockjoin_np F GLIBC_2.38 pthread_create F GLIBC_2.38 pthread_hurd_cond_timedwait_np F GLIBC_2.38 pthread_hurd_cond_wait_np F -GLIBC_2.38 pthread_join F GLIBC_2.38 pthread_spin_destroy F GLIBC_2.38 pthread_spin_init F GLIBC_2.38 pthread_spin_lock F GLIBC_2.38 pthread_spin_trylock F GLIBC_2.38 pthread_spin_unlock F -GLIBC_2.38 pthread_timedjoin_np F -GLIBC_2.38 pthread_tryjoin_np F GLIBC_2.38 sem_clockwait F GLIBC_2.38 sem_close F GLIBC_2.38 sem_destroy F From patchwork Fri Aug 15 18:14:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 118425 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 751993858C62 for ; Fri, 15 Aug 2025 18:35:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 751993858C62 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=bCQvyS0S 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 8DF1C3858C40 for ; Fri, 15 Aug 2025 18:15:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8DF1C3858C40 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 8DF1C3858C40 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=1755281749; cv=none; b=OSJr4fY0S5fa7CAjNS9cPEXiig6XvpR/PtWZJQpJepOCOsYDDJniEBYdERqN0M0Z0amyhtHi3EcaA2DGFZO66E1ankTh7tYljzCC7aVVISZN+IMEI/TdaLA73zrp6CCThAUPT5UdMg9MTQiyZK/NQ7Me1rmdqjnXXwIKvW1sjcE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755281749; c=relaxed/simple; bh=j+CdN/fpRdULzRXuTUrH4ayoNrMDgrBGPXnogHNVu90=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=DNpCi7cRaClvvAfVHLhokmEsw5IvSaUov+D2EzkprOYZf9q8tvHlkq1PKcWV2f0uLedbBtHnNZWNLR9cPKyx6iuLUUXbrggM2UChIaImj+Txndqrra5KNrRdleX3n3LXTjhPl6MAAy+0nLUsMEFQaxAOFyDNFI7H5yV5gjzAyRI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8DF1C3858C40 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 9E00B25DEC; Fri, 15 Aug 2025 20:15:48 +0200 (CEST) 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 8uF5TaHp9x1s; Fri, 15 Aug 2025 20:15:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1755281746; bh=j+CdN/fpRdULzRXuTUrH4ayoNrMDgrBGPXnogHNVu90=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bCQvyS0SyDIsexWBRLSujkgoTGMImf1uGZAFXMO7Lslv+YDRL/NDHwOWrbKOItqod +338DWdp8GUd0BETvINt5cgzLAR9nBghGoqyEI2TJq8oYazDOjOb7vGJ6Tvl5BkHgb AXxCsDq24H/Ny6ry2GLpUpCFGfrG3AJW6b9l+7eUgoB5oAMPjYWvNJ2E989wqHN89T BxDHcGiHV/IvFqIaBuwo14K5OZBUiKNb+Cl9yTZcBvsEqw+4JK2BLaW/Kw0sz8S6Hy 8Cl59HBuVcpwFE0M0hLWCgTEROq5gL5dg1wQt9gklyXRaWSCtmwEaQjZXbHP1Qx6z8 s9FU1aCl7lt9g== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 18/19] htl: move __pthread_setup into libc. Date: Fri, 15 Aug 2025 20:14:59 +0200 Message-ID: <20250815181500.107433-19-gfleury@disroot.org> In-Reply-To: <20250815181500.107433-1-gfleury@disroot.org> References: <20250815181500.107433-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 --- htl/Makefile | 2 +- htl/Versions | 1 + htl/pt-internal.h | 2 +- sysdeps/mach/hurd/i386/htl/pt-setup.c | 1 + sysdeps/mach/hurd/x86_64/htl/pt-setup.c | 1 + 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index dfab099e..329e4669 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -32,7 +32,6 @@ libpthread-routines := \ pt-hurd-cond-timedwait \ pt-startup \ pt-sysdep \ - pt-setup \ pt-spin \ pt-getname-np \ pt-setname-np \ @@ -198,6 +197,7 @@ routines := \ pt-setschedparam \ pt-setschedprio \ pt-setspecific \ + pt-setup \ pt-sigmask \ pt-sigstate-init \ pt-sigstate \ diff --git a/htl/Versions b/htl/Versions index 1c7e82c1..31456186 100644 --- a/htl/Versions +++ b/htl/Versions @@ -270,6 +270,7 @@ libc { __pthread_mutexattr_settype; __pthread_once; __pthread_setspecific; + __pthread_setup; __pthread_sigstate_init; __pthread_sigstate; __pthread_sigstate_destroy; diff --git a/htl/pt-internal.h b/htl/pt-internal.h index 24d0964e..f816aca2 100644 --- a/htl/pt-internal.h +++ b/htl/pt-internal.h @@ -242,7 +242,7 @@ extern int __pthread_setup (struct __pthread *__restrict thread, void *), void *(*start_routine) (void *), void *__restrict arg); - +libc_hidden_proto (__pthread_setup) /* Allocate a kernel thread (and any miscellaneous system dependent resources) for THREAD; it must not be placed on the run queue. */ diff --git a/sysdeps/mach/hurd/i386/htl/pt-setup.c b/sysdeps/mach/hurd/i386/htl/pt-setup.c index c6df0101..b9c41b9e 100644 --- a/sysdeps/mach/hurd/i386/htl/pt-setup.c +++ b/sysdeps/mach/hurd/i386/htl/pt-setup.c @@ -98,3 +98,4 @@ __pthread_setup (struct __pthread *thread, return 0; } +libc_hidden_def (__pthread_setup) diff --git a/sysdeps/mach/hurd/x86_64/htl/pt-setup.c b/sysdeps/mach/hurd/x86_64/htl/pt-setup.c index 76a43943..88c39b78 100644 --- a/sysdeps/mach/hurd/x86_64/htl/pt-setup.c +++ b/sysdeps/mach/hurd/x86_64/htl/pt-setup.c @@ -91,3 +91,4 @@ __pthread_setup (struct __pthread *thread, return 0; } +libc_hidden_def (__pthread_setup) From patchwork Fri Aug 15 18:15:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gfleury X-Patchwork-Id: 118429 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 37FDA3858C40 for ; Fri, 15 Aug 2025 18:40:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 37FDA3858C40 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=Wa68k2L7 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 96D9A3858412 for ; Fri, 15 Aug 2025 18:15:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 96D9A3858412 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 96D9A3858412 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=1755281749; cv=none; b=il4//NejRSt9QHhFXdXYaVx3jk1XE5PbzaibIszPdRg9uRalGQQroDGI5Eb6VCZZRNNU1XH/22MfAKQ+6zHKwzy+DfMYVuo0nWGmzFlgUZiWITL2vzP/9bv7uroVbF9ytUJ9L2VejITv0LhYiZOkaHFPBLc1U577kX/oRVlcKrk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755281749; c=relaxed/simple; bh=trN+YxLLQb/XCmMLewaGYC6fVVfZ46eyd8OQJwD8EhQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ROhiob2IRW7KOjkW93fifWkER7paHvjgsIMg7gTztyz/e6Rwz4RSVYEwcirVmYx9zmUDc7w6uiVvLvZLvk9xYYDRjDPgRvhi46mVkHcprAQa3GKHKxKs+czV/9Kfz8d2CxpeIN2jBTTfNSsbgkJw80lYr6zLHybR9GI5ljHjx/8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 96D9A3858412 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id A541022E39; Fri, 15 Aug 2025 20:15:48 +0200 (CEST) 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 0NiOP4G1wxgY; Fri, 15 Aug 2025 20:15:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1755281748; bh=trN+YxLLQb/XCmMLewaGYC6fVVfZ46eyd8OQJwD8EhQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Wa68k2L7U2G8h+/QWCK8lf3j5ie0RP4QwKDH84n3E0e9WQuJKatE62SZal7RDnAKo ql2dy4QEGpau2hL2FT0ZTtDLNyyhk0/Xe+Fgyayfs4DmRsnw6gxELUiLmDs0rvg8mJ Nw/jpVIFay8sHBlwfTNq2tgIiAGek3vVHonBFZAczZF8pqXaQXGytBV6iqq1DaIyEt kYqyJ51fzBp3UGZtG+I5k+XU+JYsgcTjoRRqJ/lH0hXhsiHEZdN6ydsY/SiQPZKo+e rXqCYsHyxRD4tJN7BztVq+quN7d08RQL9zChbWOZC2FmH3rQfNQcSKezaZMssNh6C+ 8DaaxW3CoMfPQ== From: gfleury To: libc-alpha@sourceware.org Cc: gfleury Subject: [PATCH 19/19] htl: move __pthread_startup into libc. Date: Fri, 15 Aug 2025 20:15:00 +0200 Message-ID: <20250815181500.107433-20-gfleury@disroot.org> In-Reply-To: <20250815181500.107433-1-gfleury@disroot.org> References: <20250815181500.107433-1-gfleury@disroot.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 --- htl/Makefile | 2 +- htl/Versions | 1 + htl/pt-internal.h | 1 + sysdeps/htl/pt-startup.c | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/htl/Makefile b/htl/Makefile index 329e4669..2812a870 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -30,7 +30,6 @@ libpthread-routines := \ pt-spin-inlines \ pt-hurd-cond-wait \ pt-hurd-cond-timedwait \ - pt-startup \ pt-sysdep \ pt-spin \ pt-getname-np \ @@ -203,6 +202,7 @@ routines := \ pt-sigstate \ pt-sigstate-destroy \ pt-stack-alloc \ + pt-startup \ pt-testcancel \ pt-timedblock \ pt-timedblock-intr \ diff --git a/htl/Versions b/htl/Versions index 31456186..5570a2b6 100644 --- a/htl/Versions +++ b/htl/Versions @@ -276,6 +276,7 @@ libc { __pthread_sigstate_destroy; __pthread_sigmask; __pthread_stack_alloc; + __pthread_startup; __pthread_testcancel; __pthread_timedblock; __pthread_timedblock_intr; diff --git a/htl/pt-internal.h b/htl/pt-internal.h index f816aca2..1bab90cf 100644 --- a/htl/pt-internal.h +++ b/htl/pt-internal.h @@ -270,6 +270,7 @@ libc_hidden_proto (__pthread_thread_terminate) /* Called by a thread just before it calls the provided start routine. */ extern void __pthread_startup (void); +libc_hidden_proto (__pthread_startup) /* Block THREAD. */ extern void __pthread_block (struct __pthread *thread); diff --git a/sysdeps/htl/pt-startup.c b/sysdeps/htl/pt-startup.c index 6e41d458..ce21a518 100644 --- a/sysdeps/htl/pt-startup.c +++ b/sysdeps/htl/pt-startup.c @@ -22,3 +22,4 @@ void __pthread_startup (void) { } +libc_hidden_def (__pthread_startup)