From patchwork Thu Nov 13 23:06:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 124210 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 842933858023 for ; Thu, 13 Nov 2025 23:07:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 842933858023 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 7A03C3858406 for ; Thu, 13 Nov 2025 23:06:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7A03C3858406 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 7A03C3858406 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=qhDVcF8DQeQGIIR5gQOylxyGCAWt02B1MraMxABrdZqFhhYDdOk69D9qi9rm5kzE70IvHnTql89Qagjd5WfXAhtJyrDHmuZd/AP8xdlGUurU3iw/vX+72dig0auYnQBkenDzNPmA6T6Th7LOJViYGohu3ute28sKiDFCq2nMMBA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1763075186; c=relaxed/simple; bh=43aiLeqrT9swbopE/WrPgs2IwVhQ49Jhp5SNGluKLGw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=fkj/L81NmdcOjhxldeIrVtymBj5JwJ9lq2HprSnnI5PC4VE31av/khbYMnELa+t+0LsR6sv32aQ+z1UleMjFeWVWK9jbF8ZK9Abf/Xqou2BZJ+LOl9f3Ou6jb93YMZYPYEGCzygfCiFubwtgWHwI4P1xH8ooABvaMpM+LLt1qiE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A03C3858406 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 3A19BA1AE6; 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 T5uMMYeeItV1; 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 059EFA0551; Fri, 14 Nov 2025 00:06:25 +0100 (CET) Received: from samy by end with local (Exim 4.98.2) (envelope-from ) id 1vJgOW-00000001NEe-2X2p; 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 1/4] htl: move {, _IO_}f{, un, try}lockfile implementation into libc Date: Fri, 14 Nov 2025 00:06:20 +0100 Message-ID: <20251113230623.327626-2-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, KAM_SHORT, 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 --- htl/Makefile | 5 +- htl/Versions | 4 +- htl/lockfile.c | 53 --------------------- htl/pt-initialize.c | 3 -- include/stdio.h | 6 ++- stdio-common/flockfile.c | 1 + stdio-common/funlockfile.c | 1 + sysdeps/htl/flockfile.c | 18 ++++--- sysdeps/htl/ftrylockfile.c | 17 ++++--- sysdeps/htl/funlockfile.c | 16 +++++-- sysdeps/htl/pthread-functions.h | 3 -- sysdeps/mach/hurd/i386/libc.abilist | 3 ++ sysdeps/mach/hurd/i386/libpthread.abilist | 6 --- sysdeps/mach/hurd/x86_64/libpthread.abilist | 6 --- 14 files changed, 44 insertions(+), 98 deletions(-) delete mode 100644 htl/lockfile.c diff --git a/htl/Makefile b/htl/Makefile index 15cff60d31..2f2ad0cccb 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -20,7 +20,7 @@ subdir := htl srcdir = . MICROKERNEL := mach -SYSDEPS := lockfile +SYSDEPS := LCLHDRS := @@ -36,7 +36,6 @@ libpthread-routines := \ pt-setname-np \ cancellation \ herrno \ - $(SYSDEPS) \ # libpthread-routine headers := \ @@ -220,8 +219,6 @@ install-lib-ldscripts := libpthread_syms.a include ../Makeconfig -CFLAGS-lockfile.c = -D_IO_MTSAFE_IO - all: # Make this the default target; it will be defined in Rules. subdir_install: $(inst_libdir)/libpthread2.a $(inst_libdir)/libpthread_syms.a diff --git a/htl/Versions b/htl/Versions index b56b185a10..2a83eb1b27 100644 --- a/htl/Versions +++ b/htl/Versions @@ -1,6 +1,7 @@ libc { GLIBC_2.12 { + flockfile; ftrylockfile; funlockfile; pthread_self; __pthread_get_cleanup_stack; __pthread_key_create; @@ -313,12 +314,9 @@ libc { libpthread { GLIBC_2.2.6 { - _IO_flockfile; _IO_ftrylockfile; _IO_funlockfile; __errno_location; __h_errno_location; } GLIBC_2.12 { - flockfile; ftrylockfile; funlockfile; - pthread_atfork; pthread_create; diff --git a/htl/lockfile.c b/htl/lockfile.c deleted file mode 100644 index b76a59a17b..0000000000 --- a/htl/lockfile.c +++ /dev/null @@ -1,53 +0,0 @@ -/* lockfile - Handle locking and unlocking of streams. Hurd pthread version. - Copyright (C) 2000-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include /* Must come before ! */ -#include - -#undef _IO_flockfile -#undef _IO_funlockfile -#undef _IO_ftrylockfile - -void -_IO_flockfile (FILE *fp) -{ - _IO_lock_lock (*fp->_lock); -} - -void -_IO_funlockfile (FILE *fp) -{ - _IO_lock_unlock (*fp->_lock); -} - -int -_IO_ftrylockfile (FILE *fp) -{ - return __libc_lock_trylock_recursive (*fp->_lock); -} - -#undef flockfile -#undef funlockfile -#undef ftrylockfile - -void flockfile (FILE *) - __attribute__ ((weak, alias ("_IO_flockfile"))); -void funlockfile (FILE *) - __attribute__ ((weak, alias ("_IO_funlockfile"))); -int ftrylockfile (FILE *) - __attribute__ ((weak, alias ("_IO_ftrylockfile"))); diff --git a/htl/pt-initialize.c b/htl/pt-initialize.c index 86fe66fb3a..bc8bb1e501 100644 --- a/htl/pt-initialize.c +++ b/htl/pt-initialize.c @@ -28,9 +28,6 @@ #if IS_IN (libpthread) static const struct pthread_functions pthread_functions = { - .ptr__IO_flockfile = _IO_flockfile, - .ptr__IO_funlockfile = _IO_funlockfile, - .ptr__IO_ftrylockfile = _IO_ftrylockfile, }; #endif /* IS_IN (libpthread) */ diff --git a/include/stdio.h b/include/stdio.h index b892c5b4af..17bb5ffdb6 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -206,10 +206,12 @@ _Noreturn void __libc_message_wrapper (const char *vmaname, __libc_message_wrapper (__libc_assert_vma_name, __VA_ARGS__) /* Acquire ownership of STREAM. */ -extern void __flockfile (FILE *__stream) attribute_hidden; +extern void __flockfile (FILE *__stream); +libc_hidden_proto (__flockfile) /* Relinquish the ownership granted for STREAM. */ -extern void __funlockfile (FILE *__stream) attribute_hidden; +extern void __funlockfile (FILE *__stream); +libc_hidden_proto (__funlockfile) /* Try to acquire ownership of STREAM but do not block if it is not possible. */ diff --git a/stdio-common/flockfile.c b/stdio-common/flockfile.c index f563390bbc..0c7b95d587 100644 --- a/stdio-common/flockfile.c +++ b/stdio-common/flockfile.c @@ -24,5 +24,6 @@ __flockfile (FILE *stream) { _IO_lock_lock (*stream->_lock); } +libc_hidden_def(__flockfile) weak_alias (__flockfile, flockfile); weak_alias (__flockfile, _IO_flockfile) diff --git a/stdio-common/funlockfile.c b/stdio-common/funlockfile.c index 443364edc7..23f2044d6b 100644 --- a/stdio-common/funlockfile.c +++ b/stdio-common/funlockfile.c @@ -25,5 +25,6 @@ __funlockfile (FILE *stream) { _IO_lock_unlock (*stream->_lock); } +libc_hidden_def(__funlockfile) weak_alias (__funlockfile, _IO_funlockfile) weak_alias (__funlockfile, funlockfile); diff --git a/sysdeps/htl/flockfile.c b/sysdeps/htl/flockfile.c index 0a9cc8874a..86c31f44be 100644 --- a/sysdeps/htl/flockfile.c +++ b/sysdeps/htl/flockfile.c @@ -17,15 +17,21 @@ . */ #include -#include +#include void __flockfile (FILE *stream) { -#ifdef SHARED - __libc_ptf_call (_IO_flockfile, (stream), 0); -#endif + _IO_lock_lock (*stream->_lock); } -weak_alias (__flockfile, _IO_flockfile) -weak_alias (__flockfile, flockfile) +libc_hidden_def(__flockfile) +weak_alias (__flockfile, _IO_flockfile); +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2_6, GLIBC_2_12) +versioned_symbol (libc, __flockfile, flockfile, GLIBC_2_0); +# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libpthread, __flockfile, flockfile, GLIBC_2_12); +# endif +#else +weak_alias (__flockfile, flockfile); +#endif diff --git a/sysdeps/htl/ftrylockfile.c b/sysdeps/htl/ftrylockfile.c index b8acd30ea4..c0e30aa090 100644 --- a/sysdeps/htl/ftrylockfile.c +++ b/sysdeps/htl/ftrylockfile.c @@ -17,17 +17,20 @@ . */ #include -#include +#include int __ftrylockfile (FILE *stream) { -#ifdef SHARED - return __libc_ptf_call (_IO_ftrylockfile, (stream), 0); + return _IO_lock_trylock (*stream->_lock); +} +weak_alias (__ftrylockfile, _IO_ftrylockfile); +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2_6, GLIBC_2_12) +versioned_symbol (libc, __ftrylockfile, ftrylockfile, GLIBC_2_0); +# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libpthread, __ftrylockfile, ftrylockfile, GLIBC_2_12); +# endif #else - return 0; +weak_alias (__ftrylockfile, ftrylockfile); #endif -} -weak_alias (__ftrylockfile, _IO_ftrylockfile) -weak_alias (__ftrylockfile, ftrylockfile) diff --git a/sysdeps/htl/funlockfile.c b/sysdeps/htl/funlockfile.c index c89d17ad27..20039b8482 100644 --- a/sysdeps/htl/funlockfile.c +++ b/sysdeps/htl/funlockfile.c @@ -23,9 +23,15 @@ void __funlockfile (FILE *stream) { -#ifdef SHARED - __libc_ptf_call (_IO_funlockfile, (stream), 0); -#endif + _IO_lock_unlock (*stream->_lock); } -weak_alias (__funlockfile, _IO_funlockfile) -weak_alias (__funlockfile, funlockfile) +libc_hidden_def(__funlockfile) +weak_alias (__funlockfile, _IO_funlockfile); +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2_6, GLIBC_2_12) +versioned_symbol (libc, __funlockfile, funlockfile, GLIBC_2_0); +# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libpthread, __funlockfile, funlockfile, GLIBC_2_12); +# endif +#else +weak_alias (__funlockfile, funlockfile); +#endif diff --git a/sysdeps/htl/pthread-functions.h b/sysdeps/htl/pthread-functions.h index 2b1feb4e04..4fab472e50 100644 --- a/sysdeps/htl/pthread-functions.h +++ b/sysdeps/htl/pthread-functions.h @@ -26,9 +26,6 @@ so if possible avoid breaking it and append new hooks to the end. */ struct pthread_functions { - void (*ptr__IO_flockfile) (FILE *); - void (*ptr__IO_funlockfile) (FILE *); - int (*ptr__IO_ftrylockfile) (FILE *); }; /* Variable in libc.so. */ diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index e5bd47ac39..bbd00ed11a 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -33,6 +33,9 @@ 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 flockfile F +GLIBC_2.12 ftrylockfile F +GLIBC_2.12 funlockfile F GLIBC_2.12 pthread_attr_destroy F GLIBC_2.12 pthread_attr_getdetachstate F GLIBC_2.12 pthread_attr_getguardsize F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index b9fd3dd489..b0516ddbc1 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -4,9 +4,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_spin_lock F -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_create F GLIBC_2.12 pthread_spin_destroy F @@ -14,9 +11,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.2.6 _IO_flockfile F -GLIBC_2.2.6 _IO_ftrylockfile F -GLIBC_2.2.6 _IO_funlockfile F GLIBC_2.2.6 __errno_location F GLIBC_2.2.6 __h_errno_location F GLIBC_2.21 pthread_hurd_cond_timedwait_np F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index e72dca501b..5724c88a6b 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -1,6 +1,3 @@ -GLIBC_2.38 _IO_flockfile F -GLIBC_2.38 _IO_ftrylockfile F -GLIBC_2.38 _IO_funlockfile F GLIBC_2.38 __errno_location F GLIBC_2.38 __h_errno_location F GLIBC_2.38 __pthread_spin_destroy F @@ -16,9 +13,6 @@ GLIBC_2.38 cnd_init F GLIBC_2.38 cnd_signal F GLIBC_2.38 cnd_timedwait F GLIBC_2.38 cnd_wait F -GLIBC_2.38 flockfile F -GLIBC_2.38 ftrylockfile F -GLIBC_2.38 funlockfile F GLIBC_2.38 mtx_destroy F GLIBC_2.38 mtx_init F GLIBC_2.38 mtx_lock F 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. */ From patchwork Thu Nov 13 23:06:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 124211 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 ABE6D385841E for ; Thu, 13 Nov 2025 23:08:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ABE6D385841E 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 7F5AE385840D for ; Thu, 13 Nov 2025 23:06:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7F5AE385840D 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 7F5AE385840D 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=YJmWc/3Jjin8QEjSrZzPHT/1FmdLe2YJtwdr9wuQbhk3FM9pfNEXVu5S4j6D8tis+Jd1QnvNlSPzyzl08ZfqudenQfPEO6GMD0st0Jb3TY7WX3y7XTndWO5mX7TVCmaOJB8pYOskoA3tTxM/uVbihIl4QLxnGQA3HWMTh0nNPzU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1763075186; c=relaxed/simple; bh=cvgoL//dZJC4EzFo/DMuAmu93r4Y1/RMr93BKCAv+6o=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=E02/wQxjoIQQHjbXIcbxKDVr33ywFXlzx5ZQ7ucpqSWGb996kKiRGJk5nq1OSxfgjfVHYGSaMlhplh9l+amimhmYFmmDEMRgbjXnL45214XSg/+vsWtLgxkb85WRiNaku7IgbJwc45NOZzyEaKg4d37BCy1Bn55860+rU93ab4Y= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F5AE385840D Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 8DF1BA1AB4; 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 uQxmdOVsw7mh; 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 1F076A1A3E; Fri, 14 Nov 2025 00:06:25 +0100 (CET) Received: from samy by end with local (Exim 4.98.2) (envelope-from ) id 1vJgOW-00000001NEl-2msB; 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 3/4] htl: Drop pthread-functions infrastructure Date: Fri, 14 Nov 2025 00:06:22 +0100 Message-ID: <20251113230623.327626-4-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, KAM_SHORT, 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 All previously forwarded functions are now called directly (either via local call in libc, or through a __export).t --- .../strcoll-inputs/filelist#en_US.UTF-8 | 2 - htl/Makefile | 4 -- htl/Versions | 1 - htl/forward.c | 29 ------------- htl/libc_pthread_init.c | 33 --------------- htl/pt-initialize.c | 41 ------------------- htl/pt-internal.h | 3 -- sysdeps/htl/libc-lockP.h | 35 ---------------- sysdeps/htl/pthread-functions.h | 40 ------------------ sysdeps/mach/hurd/htl/pt-sysdep.c | 3 -- sysdeps/nptl/libc-lockP.h | 7 ---- 11 files changed, 198 deletions(-) delete mode 100644 htl/forward.c delete mode 100644 htl/libc_pthread_init.c delete mode 100644 htl/pt-initialize.c delete mode 100644 sysdeps/htl/pthread-functions.h diff --git a/benchtests/strcoll-inputs/filelist#en_US.UTF-8 b/benchtests/strcoll-inputs/filelist#en_US.UTF-8 index e02df872dc..3f0a5a79d3 100644 --- a/benchtests/strcoll-inputs/filelist#en_US.UTF-8 +++ b/benchtests/strcoll-inputs/filelist#en_US.UTF-8 @@ -8029,7 +8029,6 @@ configure.ac tst-mqueue8x.c Subdirs pthread.h -pthread-functions.h alpha bsd-setjmp.S ldiv.S @@ -12602,7 +12601,6 @@ tst-atfork1.c tst-mutex4.c tst-mutex1.c tst-exit3.c -libc_pthread_init.c sem_open.c pthread_mutexattr_setprotocol.c tst-popen1.c diff --git a/htl/Makefile b/htl/Makefile index 2f2ad0cccb..4307c27203 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -26,7 +26,6 @@ LCLHDRS := libpthread-routines := \ pt-create \ - pt-initialize \ pt-spin-inlines \ pt-hurd-cond-wait \ pt-hurd-cond-timedwait \ @@ -69,9 +68,7 @@ distribute := routines := \ alloca_cutoff \ - forward \ htlfreeres \ - libc_pthread_init \ pt-alloc \ pt-attr \ pt-attr-destroy \ @@ -210,7 +207,6 @@ routines := \ sem_routines \ sem_unlink \ # routines -shared-only-routines = forward extra-libs := libpthread extra-libs-others := $(extra-libs) diff --git a/htl/Versions b/htl/Versions index 009c0d0e35..4da6204f88 100644 --- a/htl/Versions +++ b/htl/Versions @@ -247,7 +247,6 @@ libc { GLIBC_PRIVATE { __libc_alloca_cutoff; - __libc_pthread_init; __pthread_total; ___pthread_self; __pthread_alloc; diff --git a/htl/forward.c b/htl/forward.c deleted file mode 100644 index 9294d25724..0000000000 --- a/htl/forward.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Libc stubs for pthread functions. Hurd pthread version. - Copyright (C) 2002-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include -#include -#include -#include -#include - -/* Pointers to the libc functions. */ -struct pthread_functions __libc_pthread_functions attribute_hidden; -int __libc_pthread_functions_init attribute_hidden; diff --git a/htl/libc_pthread_init.c b/htl/libc_pthread_init.c deleted file mode 100644 index b61a3a1d0a..0000000000 --- a/htl/libc_pthread_init.c +++ /dev/null @@ -1,33 +0,0 @@ -/* libc initialization for libpthread. Hurd pthread version. - Copyright (C) 2002-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -void -__libc_pthread_init (const struct pthread_functions *functions) -{ -#ifdef SHARED - /* We copy the content of the variable pointed to by the FUNCTIONS - parameter to one in libc.so since this means access to the array - can be done with one memory access instead of two. */ - memcpy (&__libc_pthread_functions, functions, - sizeof (__libc_pthread_functions)); - __libc_pthread_functions_init = 1; -#endif -} diff --git a/htl/pt-initialize.c b/htl/pt-initialize.c deleted file mode 100644 index bc8bb1e501..0000000000 --- a/htl/pt-initialize.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Initialize pthreads library. - Copyright (C) 2000-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -#include -#include -#include - -#include -#include - -#if IS_IN (libpthread) -static const struct pthread_functions pthread_functions = { -}; -#endif /* IS_IN (libpthread) */ - -/* Initialize the pthreads library. */ -void -___pthread_init (void) -{ -#if IS_IN (libpthread) - __libc_pthread_init (&pthread_functions); -#endif -} diff --git a/htl/pt-internal.h b/htl/pt-internal.h index 2bc9d82d59..c0aa4aa9dc 100644 --- a/htl/pt-internal.h +++ b/htl/pt-internal.h @@ -194,9 +194,6 @@ extern struct __pthread *_pthread_self (void); #endif -/* Initialize the pthreads library. */ -extern void ___pthread_init (void); - /* Internal version of pthread_create. Rather than return the new tid, we return the whole __pthread structure in *PTHREAD. */ extern int __pthread_create_internal (struct __pthread **__restrict pthread, diff --git a/sysdeps/htl/libc-lockP.h b/sysdeps/htl/libc-lockP.h index e9977e46a1..82e769ea00 100644 --- a/sysdeps/htl/libc-lockP.h +++ b/sysdeps/htl/libc-lockP.h @@ -20,7 +20,6 @@ #define _BITS_LIBC_LOCKP_H 1 #include -#include /* If we check for a weakly referenced symbol and then perform a normal jump to it te code generated for some platforms in case of @@ -36,40 +35,6 @@ (FUNC != NULL ? FUNC ARGS : ELSE) #endif -/* Call thread functions through the function pointer table. */ -#if defined SHARED && IS_IN (libc) -# define PTFAVAIL(NAME) __libc_pthread_functions_init -# define __libc_ptf_call(FUNC, ARGS, ELSE) \ - (__libc_pthread_functions_init ? PTHFCT_CALL (ptr_##FUNC, ARGS) : ELSE) -# define __libc_ptf_call_always(FUNC, ARGS) \ - PTHFCT_CALL (ptr_##FUNC, ARGS) -#elif IS_IN (libpthread) -# define PTFAVAIL(NAME) 1 -# define __libc_ptf_call(FUNC, ARGS, ELSE) \ - FUNC ARGS -# define __libc_ptf_call_always(FUNC, ARGS) \ - FUNC ARGS -#else -# define PTFAVAIL(NAME) (NAME != NULL) -# define __libc_ptf_call(FUNC, ARGS, ELSE) \ - __libc_maybe_call (FUNC, ARGS, ELSE) -# define __libc_ptf_call_always(FUNC, ARGS) \ - FUNC ARGS -#endif - -/* Create thread-specific key. */ -#define __libc_key_create(KEY, DESTRUCTOR) \ - __libc_ptf_call (__pthread_key_create, (KEY, DESTRUCTOR), 1) - -/* Get thread-specific data. */ -#define __libc_getspecific(KEY) \ - __libc_ptf_call (__pthread_getspecific, (KEY), NULL) - -/* Set thread-specific data. */ -#define __libc_setspecific(KEY, VALUE) \ - __libc_ptf_call (__pthread_setspecific, (KEY, VALUE), 0) - - /* Functions that are used by this file and are internal to the GNU C library. */ diff --git a/sysdeps/htl/pthread-functions.h b/sysdeps/htl/pthread-functions.h deleted file mode 100644 index 4fab472e50..0000000000 --- a/sysdeps/htl/pthread-functions.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Declaration of libc stubs for pthread functions. Hurd version. - Copyright (C) 2003-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#ifndef _PTHREAD_FUNCTIONS_H -#define _PTHREAD_FUNCTIONS_H 1 - -#include - -/* Data type shared with libc. The libc uses it to pass on calls to - the thread functions. Wine pokes directly into this structure, - so if possible avoid breaking it and append new hooks to the end. */ -struct pthread_functions -{ -}; - -/* Variable in libc.so. */ -extern struct pthread_functions __libc_pthread_functions attribute_hidden; -extern int __libc_pthread_functions_init attribute_hidden; - -void __libc_pthread_init (const struct pthread_functions *functions); - -#define PTHFCT_CALL(fct, params) \ - __libc_pthread_functions.fct params - -#endif /* pthread-functions.h */ diff --git a/sysdeps/mach/hurd/htl/pt-sysdep.c b/sysdeps/mach/hurd/htl/pt-sysdep.c index 735dc5b68d..43745095bf 100644 --- a/sysdeps/mach/hurd/htl/pt-sysdep.c +++ b/sysdeps/mach/hurd/htl/pt-sysdep.c @@ -48,9 +48,6 @@ _init_routine (void *stack) /* Already initialized */ return; - /* Initialize the library. */ - ___pthread_init (); - if (stack != NULL) { /* We are given a stack, use it. */ diff --git a/sysdeps/nptl/libc-lockP.h b/sysdeps/nptl/libc-lockP.h index 1be3dd1ec1..74ae581a7c 100644 --- a/sysdeps/nptl/libc-lockP.h +++ b/sysdeps/nptl/libc-lockP.h @@ -90,13 +90,6 @@ _Static_assert (LLL_LOCK_INITIALIZER == 0, "LLL_LOCK_INITIALIZER != 0"); (FUNC != NULL ? FUNC ARGS : ELSE) #endif -/* All previously forwarded functions are now called directly (either - via local call in libc, or through a __export), but __libc_ptf_call - is still used in generic code shared with Hurd. */ -#define PTFAVAIL(NAME) 1 -#define __libc_ptf_call(FUNC, ARGS, ELSE) FUNC ARGS -#define __libc_ptf_call_always(FUNC, ARGS) FUNC ARGS - /* Initialize the named lock variable, leaving it in a consistent, unlocked state. */ #define __libc_lock_init(NAME) ((void) ((NAME) = LLL_LOCK_INITIALIZER)) From patchwork Thu Nov 13 23:06:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 124209 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 60B553857C5D for ; Thu, 13 Nov 2025 23:07:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 60B553857C5D 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 5D49C3858C41 for ; Thu, 13 Nov 2025 23:06:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5D49C3858C41 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 5D49C3858C41 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=KTdCohVZTFsQehg2bUtQW/4DLMsPdruWsgCBOSgMegM7hpy3FfqhYGCsvcCbC55ISahD7QOOr1tP1ECCmatJxB78S42gd6eP3ZCkM6d4L7tE2lEZhv1PrdLUlFGtnROc5tleVQL5L6g2UALggelFgaC75uMfHBsW3IEy0yLJodY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1763075186; c=relaxed/simple; bh=nl0NnVCA/omPedvhdgLcbKjPIQgvwrG7sZSElhywSUc=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Uyq8dWr4ECmjWqKncBXB8clXje7CyXquNzl5tJ9LjZ8i8BTVtz1nWX7HFldHr5xsB45QUb1lnVB7X8+fzTWArjGhWnHpXYuomH9Ep8RVA5Ukzocpyci0DQvQarT3qlDGOtNo5zX6uDADI0/d9JIGGMScjFR2R62a9VqNWi+mrnE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D49C3858C41 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 81FF5A05E5; 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 nrjgOJ9L8Blc; 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 250D0A1AB4; Fri, 14 Nov 2025 00:06:25 +0100 (CET) Received: from samy by end with local (Exim 4.98.2) (envelope-from ) id 1vJgOW-00000001NEu-2uOQ; 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 4/4] htl: Remove errno and herrno from libpthread Date: Fri, 14 Nov 2025 00:06:23 +0100 Message-ID: <20251113230623.327626-5-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, KAM_SHORT, 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 libc already has them. --- htl/Makefile | 1 - htl/Versions | 3 -- htl/herrno.c | 34 --------------------- sysdeps/htl/Makefile | 4 --- sysdeps/mach/hurd/i386/libpthread.abilist | 2 -- sysdeps/mach/hurd/x86_64/libpthread.abilist | 2 -- 6 files changed, 46 deletions(-) delete mode 100644 htl/herrno.c diff --git a/htl/Makefile b/htl/Makefile index 4307c27203..9fde4174bb 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -34,7 +34,6 @@ libpthread-routines := \ pt-getname-np \ pt-setname-np \ cancellation \ - herrno \ # libpthread-routine headers := \ diff --git a/htl/Versions b/htl/Versions index 4da6204f88..349ab4fe4b 100644 --- a/htl/Versions +++ b/htl/Versions @@ -311,9 +311,6 @@ libc { } libpthread { - GLIBC_2.2.6 { - __errno_location; __h_errno_location; - } GLIBC_2.12 { pthread_atfork; diff --git a/htl/herrno.c b/htl/herrno.c deleted file mode 100644 index 98012e5bfb..0000000000 --- a/htl/herrno.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1996-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#undef h_errno - -#include - -/* We need to have the error status variable of the resolver - accessible in the libc. */ -extern __thread int __h_errno; - - -/* When threaded, h_errno may be a per-thread variable. */ -int * -__h_errno_location (void) -{ - return &__h_errno; -} diff --git a/sysdeps/htl/Makefile b/sysdeps/htl/Makefile index ef156f1315..12bb54ebf4 100644 --- a/sysdeps/htl/Makefile +++ b/sysdeps/htl/Makefile @@ -1,7 +1,3 @@ -ifeq ($(subdir),htl) -libpthread-sysdep_routines += errno-loc -endif - ifeq ($(subdir),rt) librt-sysdep_routines += timer_routines endif diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index b0516ddbc1..c55b78b01c 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -11,8 +11,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.2.6 __errno_location F -GLIBC_2.2.6 __h_errno_location F GLIBC_2.21 pthread_hurd_cond_timedwait_np F GLIBC_2.21 pthread_hurd_cond_wait_np F GLIBC_2.32 call_once F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index 5724c88a6b..77d9a6601d 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -1,5 +1,3 @@ -GLIBC_2.38 __errno_location F -GLIBC_2.38 __h_errno_location F GLIBC_2.38 __pthread_spin_destroy F GLIBC_2.38 __pthread_spin_init F GLIBC_2.38 __pthread_spin_lock F