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)