From patchwork Thu Nov 13 23:06:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 124208 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 52D9E385829B for ; Thu, 13 Nov 2025 23:07:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 52D9E385829B 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 5BD0D3858D21 for ; Thu, 13 Nov 2025 23:06:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5BD0D3858D21 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 5BD0D3858D21 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=1763075186; cv=none; b=sPfm17rH8KmlOcAJPRZa2CMlL9xvRYUvP1JNy3LX/F0T5JNnj/otkszeQ1SW0/ce2HCndo8/VRNSkKnEARAyYSeGQeBRPtI4oqedO3C5X3D5aVfPSFl+dN9ngXpBpLbkU7BzO9Vkja3so5jii+WC2sH3hmjOAivslw55uzbhl3A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1763075186; c=relaxed/simple; bh=KumkT1ZIEfY4FoOSF2oZwE1063DVQe5CnibSjOhIRYE=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=T/mjh1zZoa9IfE4G9yO6iyjctCLqZinWkQjcgEAXFujsCz3MSfSXS0C7kLBmrneE/+PEqlgwJG4oTLv4PvHCFlq1JiL0C6v/HS2m6zrR/7q7urwqQkePh/qaN/ilaQ9OFWOesTuczd6LazrIHC/p/4MR2U/sYDO7S9HC689EExU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5BD0D3858D21 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 62177A03C1; Fri, 14 Nov 2025 00:06:25 +0100 (CET) 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 iPvwh0_lcujN; Fri, 14 Nov 2025 00:06:25 +0100 (CET) Received: from end (aamiens-653-1-40-48.w83-192.abo.wanadoo.fr [83.192.199.48]) (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 1687BA05E5; Fri, 14 Nov 2025 00:06:25 +0100 (CET) Received: from samy by end with local (Exim 4.98.2) (envelope-from ) id 1vJgOW-00000001NEi-2eyT; Fri, 14 Nov 2025 00:06:24 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault , commit-hurd@gnu.org Subject: [hurd, commited 2/4] htl: Move __pthread_cleanup_stack out of libc_pthread_init.c Date: Fri, 14 Nov 2025 00:06:21 +0100 Message-ID: <20251113230623.327626-3-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251113230623.327626-1-samuel.thibault@ens-lyon.org> References: <20251113230623.327626-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.0 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 It does not actually need to be extern any more. --- htl/Versions | 1 - htl/libc_pthread_init.c | 2 -- htl/pt-cleanup.c | 2 ++ htl/pt-internal.h | 3 --- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/htl/Versions b/htl/Versions index 2a83eb1b27..009c0d0e35 100644 --- a/htl/Versions +++ b/htl/Versions @@ -248,7 +248,6 @@ libc { GLIBC_PRIVATE { __libc_alloca_cutoff; __libc_pthread_init; - __pthread_cleanup_stack; __pthread_total; ___pthread_self; __pthread_alloc; diff --git a/htl/libc_pthread_init.c b/htl/libc_pthread_init.c index ca71af5d7a..b61a3a1d0a 100644 --- a/htl/libc_pthread_init.c +++ b/htl/libc_pthread_init.c @@ -19,8 +19,6 @@ #include #include -__thread struct __pthread_cancelation_handler *__pthread_cleanup_stack; - void __libc_pthread_init (const struct pthread_functions *functions) { diff --git a/htl/pt-cleanup.c b/htl/pt-cleanup.c index 76fdbe2918..054be1be4b 100644 --- a/htl/pt-cleanup.c +++ b/htl/pt-cleanup.c @@ -21,6 +21,8 @@ #include #include +static __thread struct __pthread_cancelation_handler *__pthread_cleanup_stack; + struct __pthread_cancelation_handler ** ___pthread_get_cleanup_stack (void) { diff --git a/htl/pt-internal.h b/htl/pt-internal.h index 1bab90cf93..2bc9d82d59 100644 --- a/htl/pt-internal.h +++ b/htl/pt-internal.h @@ -192,9 +192,6 @@ libc_hidden_proto (__pthread_max_threads) #ifndef _pthread_self extern struct __pthread *_pthread_self (void); #endif - -/* Stores the stack of cleanup handlers for the thread. */ -extern __thread struct __pthread_cancelation_handler *__pthread_cleanup_stack; /* Initialize the pthreads library. */