From patchwork Sat Aug 16 00:13:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118437 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 E1163385840C for ; Sat, 16 Aug 2025 00:15:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E1163385840C X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 7931B3858C53 for ; Sat, 16 Aug 2025 00:14:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7931B3858C53 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7931B3858C53 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303248; cv=none; b=SdGcK5PbqEfKW+Zr/6PZ3EXAjZR7UhGseS1yFI8LkniLUoJqd4Kfnm+UjJlsSW8NK6pRk4XcRZGPITKODa6xxVwY+ADmWLN5VAFQQWCq+nwqZdsS903ldOmCwnJhM6pVrQO+h5HjgXMyQ3kfsj8oladaT/qGZr/OfXOkhNX9+SI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303248; c=relaxed/simple; bh=DDtKZHwcg8JG3qF8c40blhhO3hJqowi4ddaX2PANCt8=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=pyPuMKWOk61FT+b3VWjVwLkH3NvXcRTKcOp6FBy+wN09y8Lz1ajSdRmhS/LJJ45K+mR5/U/PmTJCHmWpougJJ0EHdC8k43Z0pEIsvUT8WVvf9YXRzEudFritjYmsLcAznc2w/Jxuviv18N26y/GvKihrnRncUCXfFj1tP09rULs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7931B3858C53 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 69C67A5DC0; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g_LKQfPCZuax; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 1B594A49A3; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yf-00000000Wv1-3ZLU; Sat, 16 Aug 2025 02:14:05 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 01/19] htl: move pthread_setschedprio into libc. Date: Sat, 16 Aug 2025 02:13:47 +0200 Message-ID: <20250816001405.126154-2-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Message-ID: <20250815181500.107433-2-gfleury@disroot.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 82b7803c88..0f9e567faa 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 40ee2748a7..57041917aa 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 7e1429c48f..198fcc88b0 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 535740f5ea..384e39d211 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 aac3cb3319..5ba3b7f356 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 9d2c4cd742..23df0ad6d1 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 8f9d6aa842..06a85b5d40 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 81d355a94b..21555b7bd8 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 Sat Aug 16 00:13:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118441 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 512D03858C62 for ; Sat, 16 Aug 2025 00:19:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 512D03858C62 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id A389F3858CB6 for ; Sat, 16 Aug 2025 00:14:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A389F3858CB6 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A389F3858CB6 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303248; cv=none; b=KjLBrAGDbyqGzPOZ3YtgDZnhwi2vmGIMH8/q+Aj42iLnyvkWn1dThS0qsDjARD6RZLBwLrcIjXoNyF0EsKql85UFbIJKrLqpP857GZOCaVdK/KNeS/ElANfH2VcCCVU1ZDOqZZWswfvTG4iYEnVHpkKwYtK28Gm0Iq36uhYtJEk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303248; c=relaxed/simple; bh=VOppacQwQ9fl2FHaaDPnmlCGBVKcTFzyZYoK7OvLAXw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=xAeq1qCMvTt8weeVjjzcOPiRU6DYR1GcXosk101yT7+sk7k5T3q9eF7CE22jNpmj8/BX3M4LNBttn9QleI8OCOCaFFk1tR9FDNLjz1opm9ZuzXUCdUjsWYkE/chJxOJTns+ArfOFPLEkCNBZPXj39oyJquMNhl01xlJhZb/5BYw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A389F3858CB6 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 80277A5DF7; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C-6Iz25bMfZL; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 2674DA49A4; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yf-00000000Ww1-3zT7; Sat, 16 Aug 2025 02:14:05 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd, commited 02/19] htl: move pthread_get/setconcurrency into libc. Date: Sat, 16 Aug 2025 02:13:48 +0200 Message-ID: <20250816001405.126154-3-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Message-ID: <20250815181500.107433-3-gfleury@disroot.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 0f9e567faa..f33c1dccf2 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 57041917aa..ad3628eb3c 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 d43ef02ffe..c20af5dbeb 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 7b4b6f7b2d..484e0f8532 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 384e39d211..5dea8bd172 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 5ba3b7f356..90faf89495 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 23df0ad6d1..58e46f4e7a 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 06a85b5d40..1d87ec1a8d 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 21555b7bd8..b40dda87c2 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 Sat Aug 16 00:13:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118436 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 9D0A13858405 for ; Sat, 16 Aug 2025 00:15:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D0A13858405 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id C80A73858C2F for ; Sat, 16 Aug 2025 00:14:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C80A73858C2F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C80A73858C2F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303248; cv=none; b=t17LboZxQ8RBRW4cZfAjf0Jp7iGgjIbD2bcnKABFpV4BKCjPYFoEW1YdxfDmq8a4m4uKyQ3zWQGoVd8UEVtZzEZ4IKsQlCOqeigL//iEBzJB7tb8x9nTNKbtF2RY2lK1jf9MscBoG5xbmbG6BtNy5G2jM9MHi38gRLxAmHrGyBM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303248; c=relaxed/simple; bh=nZfqAYzNwh3AAMuftKrkQbWEYJ9ep2nm18VTTLbg984=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=TBr/S2wRB4TqbCoSlHVhLNzDdFVVjPKvEeXChpFeomdyQuAjJHvz1VR3L3V4Od5fjZOGgaNCWgSxCmFJCLGnZSg5t4NIn6/nI6WgKebJHMB8BMkrQIwimljysQUN0O9sVdr6kALrl7vIj6Elq6DQAvHBhJZqZk4Mc5xEXOvC21o= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C80A73858C2F Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 9671DA5DFB; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YJezWjRahEFd; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 367D2A49AF; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yg-00000000Wwk-0DpQ; Sat, 16 Aug 2025 02:14:06 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd, commited 03/19] htl: move __pthread_init_{specific, static_tls}, __pthread_{alloc}, dealloc} into libc. Date: Sat, 16 Aug 2025 02:13:49 +0200 Message-ID: <20250816001405.126154-4-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Message-ID: <20250815181500.107433-4-gfleury@disroot.org> --- htl/Makefile | 6 +++--- htl/Versions | 5 +++++ htl/pt-alloc.c | 4 ++++ 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, 23 insertions(+), 5 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index f33c1dccf2..1b2b501fef 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 ad3628eb3c..851a2a5398 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 c0074b4447..4b44e98e5b 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; @@ -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 13417df42f..7a90302b02 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 8b37838b8e..54385630b1 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 f740b120a1..56a49d617c 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 5dea8bd172..1538fdee72 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 Sat Aug 16 00:13:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118439 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 5C80A3858C39 for ; Sat, 16 Aug 2025 00:18:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C80A3858C39 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id E74043858D20 for ; Sat, 16 Aug 2025 00:14:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E74043858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E74043858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303249; cv=none; b=uiGayt5uWDXPeodzlyQ62tYkCE/P1IoYuwguYGCtybkoEpEjvhMECCKUPyruagYN1uxZB/KPt1Z0+joavWnlyp7N3uaY9KorCn9aCzzQwVBccbKh7RJXviJvf+ghtRadTGCSdVY7M/8llb3jgxiZxuQlGlUjLWrXXmVBaFAdRrc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303249; c=relaxed/simple; bh=Mp3wBn9jfJzKpEGO98zHNXIXDCT15nKRUVOTSit1054=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=TpyHLAMSngenpgpAQTQa0A09EF39NvJjB+Tx1hybJyHaFiEPVx9NcDMvzV3csmI9kaYFRZomzorvc7fjDCUjXonZv2ypBQYnRxVGqctWm2jSLdwYQdv3H4w78/lZhJva80BbQLnwNUEHR/Xr/XcnzpLOsBrXZHEIPtqw4dGcAsA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E74043858D20 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id AAA58A5DFE; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jGfpOLzQAt84; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 3EDACA49BC; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yg-00000000WxY-0f0i; Sat, 16 Aug 2025 02:14:06 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 04/19] htl: move __pthread_stack_alloc into libc. Date: Sat, 16 Aug 2025 02:13:50 +0200 Message-ID: <20250816001405.126154-5-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Message-ID: <20250815181500.107433-5-gfleury@disroot.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 1b2b501fef..88d02ca8a2 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 851a2a5398..8d9dad887c 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 54385630b1..28b7785045 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 3e196f8ca7..64cc18657e 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 Sat Aug 16 00:13:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118438 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 1FD2F3858C2F for ; Sat, 16 Aug 2025 00:15:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1FD2F3858C2F X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 0A65F3858C39 for ; Sat, 16 Aug 2025 00:14:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0A65F3858C39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0A65F3858C39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303261; cv=none; b=JjuZDaTEYjPOfu5kpc2HePvZ3v8RtcbDFnOsicY3v5UqBa7eh2tngZTw+wXmWIGWtAcLnAAWOuVnw18hSO0omq2v4U+9yS0f+wIckSmv10hfwVBtRpNk1TmcLwV4mWRcVc/Uply8ENdy8MsutLuRkdXGmv/HdQ9w46jaFESSTAI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303261; c=relaxed/simple; bh=36Fwy3vj8hl0RJG1AJHr/oU1r7uJqOD6DQOtx9au2Rs=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=DtKBhh+veW0J0IZMoUH9FYdOxHHJWog7oVOyLWN5PY3aIhrOZPmBL6rLTjzBuHUBHo3THTuss/a6ndPgUDh5CJ77/yBJM7wc3Ul6RWB6asi1zarAg5OPaCaHIcSSLJTz6tfGIV97JQFn7T9Lbfvl/g7zjuhfixiOdvA4pd5RH78= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A65F3858C39 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id C34C1A5E01; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UTNn2zQpUxTa; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 51A78A4988; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yg-00000000Wxi-15jh; Sat, 16 Aug 2025 02:14:06 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd, commited 05/19] htl: move __pthread_thread_{alloc, start, terminate} into libc. Date: Sat, 16 Aug 2025 02:13:51 +0200 Message-ID: <20250816001405.126154-6-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Message-ID: <20250815181500.107433-6-gfleury@disroot.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 88d02ca8a2..e9fa141193 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 \ @@ -208,6 +205,9 @@ routines := \ pt-sigstate \ pt-sigstate-destroy \ pt-stack-alloc \ + pt-thread-alloc \ + pt-thread-start \ + pt-thread-terminate \ pt-timedblock \ pt-timedblock-intr \ pt-wakeup \ diff --git a/htl/Versions b/htl/Versions index 8d9dad887c..c216db4b80 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 28b7785045..7651446b3b 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 3f840e4084..020ff74b4c 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 65bc8d4afc..64811e4da3 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 58f265dbe2..05ca3edaea 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 Sat Aug 16 00:13:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118442 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 C99DF3858C53 for ; Sat, 16 Aug 2025 00:19:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C99DF3858C53 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 0F2943858402 for ; Sat, 16 Aug 2025 00:14:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0F2943858402 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0F2943858402 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303261; cv=none; b=JsLyDAUSCWMDr7ld1IgBUlko4auW1FGfkwoqU6bzKKtuH6eMVd87KNzGVJ7fpkfYP8YqNRqIutVRYev7jjHb4m1+Xctu1jQyLbd+Nim0yaCgIu4gPibtBte8NmhmtJNo/OuBd0yToXj5lQdKTIS7u4Om2/bt4sck5WwvliZeViw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303261; c=relaxed/simple; bh=D72GIWATqvKTW4O23UW+2gmMKLhoey/2L31j/qOopHE=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=dtvHWP3vDlKkdRBOY6NmOZmv5MJ8lRN87pylTyrjp5oIOWgZw+UAPjyDc/vjyIkqSv8xCH1DdAipfianv4D0bKFORh0Kjs63Io0D2Fe5vgMefX8h2U+OcBjLwmvvxd91A/c0CNBQDJuQ9c1hYZS5/wwvoMrUXGpJcq4m5D9m78s= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0F2943858402 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id D5886A5E03; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NKsEVr-eOrTX; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 53065A49C0; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yg-00000000Wxl-1Vqe; Sat, 16 Aug 2025 02:14:06 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 06/19] htl: move pthread_getcpuclockid into libc. Date: Sat, 16 Aug 2025 02:13:52 +0200 Message-ID: <20250816001405.126154-7-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Message-ID: <20250815181500.107433-7-gfleury@disroot.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 e9fa141193..be7db0ab5d 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 \ @@ -150,6 +149,7 @@ routines := \ pt-dealloc \ pt-destroy-specific \ pt-getconcurrency \ + pt-getcpuclockid \ pt-getschedparam \ pt-getspecific \ pt-init-specific \ diff --git a/htl/Versions b/htl/Versions index c216db4b80..68c7f01ed0 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 0402cef9a4..b37b7b7809 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 90faf89495..791920f257 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 58e46f4e7a..6c9ca8e194 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 1d87ec1a8d..0e03d9dc05 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 b40dda87c2..e68935dc5e 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 Sat Aug 16 00:13:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118440 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 7C2DA3858C36 for ; Sat, 16 Aug 2025 00:18:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7C2DA3858C36 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 07EA63858C42 for ; Sat, 16 Aug 2025 00:14:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 07EA63858C42 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 07EA63858C42 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303262; cv=none; b=ukFKGAXdxldqYrmuE1WdV/1EADwSTd17A5Z9XyEGqeq8JwzHMT/Ur3QBsTgb+hv4znwDGeN+jLdiwAgDEBq9vVT9wsyGYkjbSM+02+hbOqI5upRnA6/RFSJFAWKpAoi0KTinwIjjDIQL1/RbjI6J0L2X92RdvEA0q+pSj3quMHU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303262; c=relaxed/simple; bh=pN4ZWhGMnHnUsj4intBq6Bo+EIVxXfADGKXXMRC0+fw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=YZdvm4AvF9H/JGqEvABsTv4ZalvFrJALA5Ypja1IzlMO53T0RFHbPiIRGOjt1LX7Rq7nBZBhq9O/qNrJ+FyYkOrJiHdtDyGiq6uTnsDu16+Mdw4yH6xqIFxn80oU32ssbw2nMtOVfuI4qtCv62QVsIGqXMrF3nxmVlO08Y0YnDU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 07EA63858C42 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id E9683A49C0; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WqiS_lh-FT6U; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 6040FA49C7; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yg-00000000Wxt-1we8; Sat, 16 Aug 2025 02:14:06 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 07/19] htl: move pthread_yield into libc. Date: Sat, 16 Aug 2025 02:13:53 +0200 Message-ID: <20250816001405.126154-8-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Message-ID: <20250815181500.107433-8-gfleury@disroot.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 be7db0ab5d..6c04a276b9 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-timedblock \ pt-timedblock-intr \ pt-wakeup \ + pt-yield \ # routines shared-only-routines = forward diff --git a/htl/Versions b/htl/Versions index 68c7f01ed0..e6bd128925 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 0cab615a8d..f9f0b63437 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 791920f257..20cff5f143 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 6c9ca8e194..b3afc039e5 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 0e03d9dc05..88d180fcf2 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 e68935dc5e..e76c359b1d 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 Sat Aug 16 00:13:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118445 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 C9BEC3858405 for ; Sat, 16 Aug 2025 00:22:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C9BEC3858405 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 00AD03858C2D for ; Sat, 16 Aug 2025 00:14:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 00AD03858C2D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 00AD03858C2D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303262; cv=none; b=AKrmgBxMe4satqvg4C3lcFkJHvZ3+QzbQ4eHG0R+CDaknJHBk+jGtcUm/1kBJk+0hfZ4l00sioERn02yZARuv1bVwQFSN/NshFRdHsFRLn8etc0T0d8G8n5kbCCM0DYNQQ9YRW8nyerpoJmVKd42PghMPTyk+9UTU6LWj39eS3U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303262; c=relaxed/simple; bh=SwHDirEeOXbTegsaS4DiiefmgKi80eseeK1sqdQGSqI=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=EWpSYzn+Eh2zNm68QzhYDvFh4jlPR4fFD2Ph0OAxY6V1IpkUiaOzF+YWJwG7aoIsSjZdOlUY74bPKtHqffWOCqGgyo1iPRwgvlcQ1hOKZf9chtPz3CupPqaTXBS2xc34t+YPoCDIVt6UGlmU1TjkWfyposVbUQSamnGzHPbT/S4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 00AD03858C2D Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 07B82A49C7; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pWMMMUNqVa3j; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 68A34A49CB; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yg-00000000Wxx-2NPF; Sat, 16 Aug 2025 02:14:06 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 08/19] htl: move __thread_set_pcsptp into libc. Date: Sat, 16 Aug 2025 02:13:54 +0200 Message-ID: <20250816001405.126154-9-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Message-ID: <20250815181500.107433-9-gfleury@disroot.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 6c04a276b9..88f65c419a 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 e6bd128925..e5ff9186aa 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 fb451e0cc2..1b727069df 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 fd3eb861a1..06c746d313 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 9281545ee8..f3e3d0a11e 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 Sat Aug 16 00:13:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118443 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 B802D3858C40 for ; Sat, 16 Aug 2025 00:21:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B802D3858C40 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 41535385840C for ; Sat, 16 Aug 2025 00:14:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 41535385840C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 41535385840C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303262; cv=none; b=kH6uQLkILzhAD0f9UVO9k4auAOT0psfqrBi1+VAuBZy4kxczlI14fm9IpwEv1GMNzLDri3ejIvWwNZUZNWwrzB+ijMUSxvtPCOC+vlryuFnMGqEASC98e2mlpIrAcW8yhdgjD4Qb3mCPrXNhHExcERkBdp6KsLH/Dxd/P8fDB8s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303262; c=relaxed/simple; bh=scuwYxDJVfI57CSnuHLwJTxJD9v65neNMKc/lGif9xw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=k44DG+X1+fygXafG6yAs4UHL4GHOc4xlA/vmwQe+N8Cj270PtsbpjAU5Lh8LwTXnPBqhSxUIAegWUQ8+j1gCHh71JHD20goyVYk2nYUTwtt6aWnnjFQX5+UCSq/VbTbqfo9tdfx/UHklMdHVxfKWg6dUUFPSyqlfStJ37jKi1sQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 41535385840C Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 46A0DA49A3; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id izN8i5Yyl2D2; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 7E057A5DC6; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yg-00000000Wy1-2UWF; Sat, 16 Aug 2025 02:14:06 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd, commited 09/19] htl: move pthread_cancel, __pthread_do_cancel into libc. Date: Sat, 16 Aug 2025 02:13:55 +0200 Message-ID: <20250816001405.126154-10-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Message-ID: <20250815181500.107433-10-gfleury@disroot.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 88f65c419a..3ec68aa842 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-getcpuclockid \ pt-getschedparam \ diff --git a/htl/Versions b/htl/Versions index e5ff9186aa..078aa8b33a 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 b4f3a8b7e4..0005284fa8 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 20cff5f143..1128ca2496 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 b3afc039e5..3c7c8d9398 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 88d180fcf2..8b5d0c8871 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 e76c359b1d..f8d7ee6bfd 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 Sat Aug 16 00:13:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118444 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 B919A3858C2A for ; Sat, 16 Aug 2025 00:22:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B919A3858C2A X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 2032C3858401 for ; Sat, 16 Aug 2025 00:14:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2032C3858401 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2032C3858401 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303262; cv=none; b=lHl96Ibq8hhGxXDFOYE6XhLKztNlW5Ed1yYZSRqdoR9cJLR++LPfQOAWJ6kFxm8Ph9qbr31Q8PTAJR+BJymk3D99ULmphFlZwlGQ6H8nTPzxJ6utxNfp8LMOIeQgScQCiPaYir1z6uPtbGERYndxlJFOIt5MdCAhVgeDT95oo44= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303262; c=relaxed/simple; bh=h95LBz5x3xVHtXRa6/lApr4wIlxm0DLM5YtbfwJ0F1k=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=ngfS1XJ6HnQhXqzv1AIo8N+z4UYGE2dLA0OLtMe3WLp2m981631rcVPLdGHfbAam1QWvJ1IAg7b3JCC0+u+YVjR1rF3uupv5BhPUTdcjAlxBoMoGOf+Jgz1bVu7XI7wccu4boYo9oMgu9Jv4RyVEIBBC3BIIUuBAjXPWYtCa3no= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2032C3858401 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 2FCD2A5DC3; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yVceN630OzoY; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 7C2B4A49A3; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yg-00000000Wy4-2oSK; Sat, 16 Aug 2025 02:14:06 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 10/19] htl: move pthread_kill into libc. Date: Sat, 16 Aug 2025 02:13:56 +0200 Message-ID: <20250816001405.126154-11-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Message-ID: <20250815181500.107433-11-gfleury@disroot.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 3ec68aa842..0acd3a8868 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 078aa8b33a..06977e677b 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 77be247f2b..f3a283f284 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 1128ca2496..6056958fcd 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 3c7c8d9398..afb9e6064d 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 8b5d0c8871..b17e1980b5 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 f8d7ee6bfd..f1fef475ad 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 Sat Aug 16 00:13:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118446 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 2E4F13858C39 for ; Sat, 16 Aug 2025 00:22:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2E4F13858C39 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 299583858405 for ; Sat, 16 Aug 2025 00:14:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 299583858405 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 299583858405 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303262; cv=none; b=awoETQeKZ5ChI12BVb+8T01RZ/El+ONy2lmFs+KY7HHH7sZt4yG1mt0lhdz3jC0JXTWDHwKZVqckMAjJg6M8rdiLFR8Jj/1s4eDepSjJ8wktf7iXvBdXUcUCQlqHCEzh4TuIU3Tp3VNTQgBGQY4YiJpUIdF0P9hl52jXW7YTlj4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303262; c=relaxed/simple; bh=FMNCuajDLYB8JlGmV+j8TehTfHM4MizcSkwq+KdzxTw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=d4e/97S1B02TCfsfilq5BDGxubgpTyNwrNkNynIUoBavK9dgtuhSLvzNtsJ4RvYg0vn0Hmhl49TE9xVseatH+RzmTB36wOhtYPVcY1+mX4lLkg24nNb8q50O00bcAZkVea6xBYwyFORGWOMH213RKV80qdkiyPD9bO4oKJ7gU/Y= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 299583858405 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 1DF77A49CB; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EqZZcA7yjWxX; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 75CCAA5DC3; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yg-00000000WyA-2wmk; Sat, 16 Aug 2025 02:14:06 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 11/19] htl: move pthread_testcancel into libc. Date: Sat, 16 Aug 2025 02:13:57 +0200 Message-ID: <20250816001405.126154-12-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Message-ID: <20250815181500.107433-12-gfleury@disroot.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 0acd3a8868..ecfa3c1779 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-thread-alloc \ pt-thread-start \ pt-thread-terminate \ diff --git a/htl/Versions b/htl/Versions index 06977e677b..0f22745914 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 4eef765f30..0332f6dd74 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 1538fdee72..dd9d77776f 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 6056958fcd..a676cd0f75 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 afb9e6064d..044fb1c355 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 b17e1980b5..dff8eee881 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 f1fef475ad..66f06f82b3 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 Sat Aug 16 00:13:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118447 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 E45CD3858C40 for ; Sat, 16 Aug 2025 00:24:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E45CD3858C40 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 3961F385840B for ; Sat, 16 Aug 2025 00:14:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3961F385840B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3961F385840B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303262; cv=none; b=Jo3t+vF9VuvSvrikgWMdxsrsLUueh84pX8OKhsq6Zuq5XHhEn5jvOzLXoGQGnVfQy7NBA7xpgmrTe9KuIAKkU7D1gr/lJlspzoBz79lVk4O1zxVxs4HAu3A0dOqX0t/NQ9ZNQkvvlUBvU70ClJeHg+7cG/OS9zpVB3oUj1B6K+s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303262; c=relaxed/simple; bh=/wXnvx+tAVDvcQofxKlhv3GAmacAgObO2KBFOQL7S48=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=NvrUV6U1cQNmuWQgCapElhnvoAJRiKMcVNldQpUBGLZV/4wuuRXddtL6VGb6DUcjGfFWcCvpGceDxxG01AZ/5EL3HXoDp9L/n0EjAJAsZwvPGqnNsMIm/3FXsCLrBfi87eZbwOiDK+NbVcVxBNJWlx2TXsGSnNViP90kvYEwNU8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3961F385840B Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 58C33A5DC6; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s0yrhTUigG_H; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 95C7BA49A4; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yg-00000000WyD-36wR; Sat, 16 Aug 2025 02:14:06 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 12/19] htl: move pthread_getattr_np into libc. Date: Sat, 16 Aug 2025 02:13:58 +0200 Message-ID: <20250816001405.126154-13-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Message-ID: <20250815181500.107433-13-gfleury@disroot.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 ecfa3c1779..64e484c589 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-getcpuclockid \ pt-getschedparam \ diff --git a/htl/Versions b/htl/Versions index 0f22745914..c94bd61500 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 a851514709..74b86ca767 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 dd9d77776f..0deea22e8a 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 a676cd0f75..0cbff57785 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 044fb1c355..3d22516688 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 dff8eee881..2b983e489d 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 66f06f82b3..cf45150539 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 Sat Aug 16 00:13:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118449 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 57FB93858402 for ; Sat, 16 Aug 2025 00:25:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 57FB93858402 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 308D43858C74 for ; Sat, 16 Aug 2025 00:14:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 308D43858C74 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 308D43858C74 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303265; cv=none; b=d68PzG55mj5RG1g86qPJX1TO20M7XexkW2XRcNyg2SfkJJPwyysysDztC5uRIp7XqNWUv0ZAmF2Eq9XrUeT4m2HE76U+3KdPxN92OvRp6hWy9kdu/PD5diNV8cgQyBu05XGkS32nm/dAo/O7JgESI200BkszrP09/+euX9bEzV4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303265; c=relaxed/simple; bh=BUP7Xk7V+g9RRcCnh7dteHLbGQJdF8OZ6JebuPRE1To=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=WvZECoXKnOCy4jdRdIIoD410BG7tXL3z06cHoqTrN52FYi3KZSilbIQ2LxRZM91DyJy8wedAsFds7S3x71CCMjS8iY1lkEEJUiP4IH3CNhrJY3Yo8/BC4012LXb7Q2+qT3/55J4rMMvSv+/AQmnByHu9hRokh3g35m8YW6gxR88= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 308D43858C74 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 6A9C6A49A4; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FwBWiXUgTTZM; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 9C4DEA5DFD; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yg-00000000WyJ-3EGX; Sat, 16 Aug 2025 02:14:06 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 13/19] htl: move pthread_mutex_transfer_np into libc. Date: Sat, 16 Aug 2025 02:13:59 +0200 Message-ID: <20250816001405.126154-14-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Message-ID: <20250815181500.107433-14-gfleury@disroot.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 64e484c589..7ce56265f5 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 c94bd61500..7d0b5f21be 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 72f83ee0b0..8961cb26bd 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 0cbff57785..e795ff5ace 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 3d22516688..bfec2a2ad3 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 2b983e489d..bebf927688 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 cf45150539..9164c479a1 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 Sat Aug 16 00:14:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118452 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 D363D3858C42 for ; Sat, 16 Aug 2025 00:28:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D363D3858C42 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 37EE93858CDA for ; Sat, 16 Aug 2025 00:14:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 37EE93858CDA Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 37EE93858CDA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303265; cv=none; b=wmwSis6ItxrQXtc9zXSwKHlgje7IoMIfw9aFlGQOVGKA5kIBJarRIquHQqmQC2GKkmsp0cS877f0U7gPftq2El56LPMNfunsds5hh8jWE4N/a+Tp9NJmwPVhpRahCmP3bt0eFDjeCdTd9LScpdwPyJbalG5OKMblXDfuHBNx1zU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303265; c=relaxed/simple; bh=0C0eFXn8LRZSHRqW9iFyaNWEEyN9nUw6SZZfyM/fuNM=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=vj49iwnbHNnReg0G7Bux4cWLdNlXpxohZepS5z0/gwVVvUvsloGj6VchQfVnZwNBhhP1QwZu8/GjMDXZigdwsFf6jSeL1PzXCT9YoTJtKgDCjEzRuQ0zXHOHK1ejNvhKt4xqt9AXiFgHs8rSZiW8nwWcUjUwfLzEdkH+tSn2mkg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 37EE93858CDA Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 7A9C1A5DFD; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6OOozvPEOSSP; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id A4EBBA49AF; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yg-00000000WyM-3LU6; Sat, 16 Aug 2025 02:14:06 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 14/19] htl: move __pthread_sigstate_init into libc. Date: Sat, 16 Aug 2025 02:14:00 +0200 Message-ID: <20250816001405.126154-15-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Message-ID: <20250815181500.107433-15-gfleury@disroot.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 7ce56265f5..52f784a72d 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 \ @@ -202,6 +201,7 @@ routines := \ pt-sigmask \ pt-sigstate \ pt-sigstate-destroy \ + pt-sigstate-init \ pt-stack-alloc \ pt-testcancel \ pt-thread-alloc \ diff --git a/htl/Versions b/htl/Versions index 7d0b5f21be..4845742fc3 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 7651446b3b..24d0964ebf 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 5a17dd5982..a0c7f277e3 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 Sat Aug 16 00:14:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118454 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 0AA2F3858C2D for ; Sat, 16 Aug 2025 00:30:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0AA2F3858C2D X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 70DA9385840D for ; Sat, 16 Aug 2025 00:14:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 70DA9385840D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 70DA9385840D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303266; cv=none; b=Gq0Jz5ZDMQzoPyRz0M1KHTdYDXrHMzWvr4yEG4JD0SUxBFVQ4MbTFjcTsaftlFne44TWsethkylJa6QGnGNQC8AGIO/lE8FuW5La90W3jKNfKc5qSmHml+y07Q2c2GMVT/UvYoYT5dyjaSr21xltlz/vMHPdMpx7FhmJZakxopw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303266; c=relaxed/simple; bh=s+MdfjQmdRZKj4PSf1Jt5nPwFTpq4yMoZHhYMxL2GVI=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=eOhMLgKITaLyOixw6JQgU7ieu8wCnfS4hXpI6dt5W58zF1CYDuI3I9jFtl+ztELx88KxtsNSl60QN9yPjY+iklnS/fBYQjvFeKHzQRnBfHye63sS2EImRttdtx2PYPoahdVvVSjIESINXuQphTRia/VQjtRC0YSR/c5NHFfMqOQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 70DA9385840D Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id A630EA49BC; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kBioOgc4099V; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id BF8F2A5E00; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yg-00000000WyQ-3Shg; Sat, 16 Aug 2025 02:14:06 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 15/19] htl: move pthread_detach into libc. Date: Sat, 16 Aug 2025 02:14:01 +0200 Message-ID: <20250816001405.126154-16-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Message-ID: <20250815181500.107433-16-gfleury@disroot.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 52f784a72d..4982409c77 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 4845742fc3..322c09f908 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 a29b68b4b0..f0d43af7f6 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 0deea22e8a..98850e9f1d 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 e795ff5ace..da2ad4ae66 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 bfec2a2ad3..094f7de25f 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 bebf927688..2e7e00773a 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 9164c479a1..926d31b9cf 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 Sat Aug 16 00:14:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118448 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 98CF93858C2A for ; Sat, 16 Aug 2025 00:25:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 98CF93858C2A X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 0163F3858413 for ; Sat, 16 Aug 2025 00:14:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0163F3858413 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0163F3858413 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303266; cv=none; b=H+/FDtR9bIy+QjLdXjyseLUBJnzrLig2yb+TjoqmORk1GHTqL7OFgK86WhR5CztTUrEYQdSqja+i+DQ5kZ0H/6t61YZqGKc9WFWUGd7a0NWbsnX3kbqaE3nmvhJ/AGbDwAVhOtqE+Vbi41J33L8DPM8s3NnzqzDBukTCeq9Vq2w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303266; c=relaxed/simple; bh=IjNw2AjV8vVZyYaO7soYykVYmcaF07MGuSNBZWQRpD0=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=oFHovUlzj660yOMc198C8M/0VB7bKdmbBZ2GKIpN1WZRj6/uJha59vbxlbQlykwgDzh8b7lpffKnbvl/2TqFQ/DEhUhWdRQiK/GWv278AucmqgI+w9P3IVCNNZvHFcAWG9zkA6w2gYbAB6OQjMKpi9heRLJfb8lYRU624KjgxVk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0163F3858413 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 992B4A5DFF; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HHacW5rKa_ts; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id BD52EA49BC; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yg-00000000WyU-3a8f; Sat, 16 Aug 2025 02:14:06 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 16/19] htl: move pthread_exit into libc. Date: Sat, 16 Aug 2025 02:14:02 +0200 Message-ID: <20250816001405.126154-17-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Message-ID: <20250815181500.107433-17-gfleury@disroot.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 4982409c77..8530098a71 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-getcpuclockid \ diff --git a/htl/Versions b/htl/Versions index 322c09f908..44af006b74 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 21acf664f4..9294d25724 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 2aba043381..9d331d0d81 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 b4e8b15b47..a4e49edfa6 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 0d5692e661..d1f14de854 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 b33931c468..73aac5fd3c 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 aec13a6022..1fde0aeaa3 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 98850e9f1d..e0f0f7d45d 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 da2ad4ae66..2ec557b26d 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 094f7de25f..3f3c17c15e 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 926d31b9cf..6dfca3f44d 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 Sat Aug 16 00:14:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118451 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 2C3533858C62 for ; Sat, 16 Aug 2025 00:27:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2C3533858C62 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 778B33858D1E for ; Sat, 16 Aug 2025 00:14:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 778B33858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 778B33858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303266; cv=none; b=QI3eUaY9mKkvKV5VtoO5lR109otLELcaSNnao4D/XbM/W28xDXaDnY41FojOG80r5hCZCwp/y2KJOOdfXe046B/wrtrBdW7019ad8MsIvjg4UDcK4quWRHb1iQOjEFx5cf/C1MMMWj2xFqAnXj5DwPviwyVtIR7rDrJJVoNnLFc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303266; c=relaxed/simple; bh=igmGSTEPllR/UESFA2DvvoKB82ZQtOTpKWORYlophB0=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=GfViPxWILcD0nW/Awbf8dHUiC7anR7KwNegKYw+5AgmpMIBtb4MOlMx2JwTSejS/IuWgNm8mCBb5KPV7VOiR6UmGn5ZB8pYYFULY9laD37pHvbCo/Fsgn/hFn7tplBJvvpZvrBfkgYjpFVQs76IoaJAZT/tphN27WKQWPdp3aYA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 778B33858D1E Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id B2B73A5E00; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H6z8ZFMy0HBg; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id C75E8A5E02; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yg-00000000Wyd-3hCJ; Sat, 16 Aug 2025 02:14:06 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd, commited 17/19] htl: move pthread_{join, clockjoin_np, timedjoin_np, tryjoin_np} into libc. Date: Sat, 16 Aug 2025 02:14:03 +0200 Message-ID: <20250816001405.126154-18-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Message-ID: <20250815181500.107433-18-gfleury@disroot.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 8530098a71..ab78372da7 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-getschedparam \ pt-getspecific \ pt-init-specific \ + pt-join \ pt-key-create \ pt-key-delete \ pt-kill \ diff --git a/htl/Versions b/htl/Versions index 44af006b74..1c7e82c1d3 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 4e4798a476..7a8da01803 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 e0f0f7d45d..9273a5885f 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 2ec557b26d..1e5454818a 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 3f3c17c15e..8a056c89ff 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 2e7e00773a..1bf1bcabe4 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 6dfca3f44d..5caa7bcfb9 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 Sat Aug 16 00:14:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118453 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 3DBAB3858D1E for ; Sat, 16 Aug 2025 00:29:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3DBAB3858D1E X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 02750385841B for ; Sat, 16 Aug 2025 00:14:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 02750385841B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 02750385841B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303266; cv=none; b=fbbnJLVYOKWmO145tLqM0cwNWE9928t4dOba5DFit5yuZwZ8tG8GhKXWwHcbm+MqZVJRy/i9elApbhHdsqxkMnjcpWxi87rQFQs+vlzBHzHhnuFkl5/dGOvvobaZ/CRCNyui9qYMdaZ+SBKgT/CHLoU0DVXPHgwbAfuWlfLKzH4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303266; c=relaxed/simple; bh=wFLvO9wwPK1/vzszqwxqm+HXUovKJtTV/9BovT6z0Gs=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=XUErYhNAgpBGhiOISZ89+FxvSnWgK1G1BnWoxcKo4UKL7Cflbj194lQNaY/VfySx0ZnD215X0iA5QLAR1uvwQKlW8ThAO4duxRMFsnnnkVrewnhgs5L+4MwwG8ad1soIOXKXarJL3EMeF+zUWlyMBtLIdBntOYJTlmn9GyKfTEY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 02750385841B Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 8BD15A49AF; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RkMkLW2-RdBN; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id B2CEFA5DFF; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yg-00000000Wyj-3ov8; Sat, 16 Aug 2025 02:14:06 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 18/19] htl: move __pthread_setup into libc. Date: Sat, 16 Aug 2025 02:14:04 +0200 Message-ID: <20250816001405.126154-19-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Message-ID: <20250815181500.107433-19-gfleury@disroot.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 ab78372da7..995bcefbfc 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 \ pt-sigstate-destroy \ diff --git a/htl/Versions b/htl/Versions index 1c7e82c1d3..31456186c8 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 24d0964ebf..f816aca282 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 c6df0101cf..b9c41b9e6e 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 76a4394332..88c39b7899 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 Sat Aug 16 00:14:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118450 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 5123E3858D33 for ; Sat, 16 Aug 2025 00:27:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5123E3858D33 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 87C1B3858C98 for ; Sat, 16 Aug 2025 00:14:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 87C1B3858C98 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 87C1B3858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303266; cv=none; b=QlTmkWFnFbOesHrA6MnE9IcR3F10uKgBXq8KzKI5wbmdQ+XiL5xkPT7NbdjA7CvGFgdD/1S3FKjNLvrH6i781ihvA8mkffEWC7JAALpaqPxHILQihSDsfM1SquusACgZ68gnAXg9h6+/Fq8kpPo0jUu6BKIt4c3woxkRoFgmQKI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303266; c=relaxed/simple; bh=hCJgR/43H06gMmdh+/SPUe+RwW04XNu/QHpRXhRrltw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=T1rzJo122xfuj5J8Cj1A/KygceS9YAXivYKevMrPZcEe6uGD+ToC2Mu9iAkomHnDr8BwEex+SVfkIyxjh5LDaS/n9Mw5uaJPqsWab1TIV0Wsz4/AI0HCSi6PoJvCBWtvsXfFeNgm4fTRvThrsgamwLU9K+MAsQKvnex2arGo7Fw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87C1B3858C98 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id BFB10A5E02; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9ABJtebPCtRV; Sat, 16 Aug 2025 02:14:08 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id CF3DFA4988; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yg-00000000Wyn-3wda; Sat, 16 Aug 2025 02:14:06 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 19/19] htl: move __pthread_startup into libc. Date: Sat, 16 Aug 2025 02:14:05 +0200 Message-ID: <20250816001405.126154-20-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org From: gfleury Message-ID: <20250815181500.107433-20-gfleury@disroot.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 995bcefbfc..ec48f8b91a 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-destroy \ pt-sigstate-init \ pt-stack-alloc \ + pt-startup \ pt-testcancel \ pt-thread-alloc \ pt-thread-start \ diff --git a/htl/Versions b/htl/Versions index 31456186c8..5570a2b631 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 f816aca282..1bab90cf93 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 6e41d458df..ce21a51885 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)