From patchwork Sun Aug 17 23:26:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118502 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 78C4A385840E for ; Sun, 17 Aug 2025 23:29:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 78C4A385840E 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 A03E4385840C for ; Sun, 17 Aug 2025 23:26:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A03E4385840C 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 A03E4385840C 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=1755473190; cv=none; b=MrICS6bDwH/ycCsA8ywXkqPxtiQJL9W5on3mOWJVzszmsAgjaIh+URvZmvqXD9LcwoWSxUgtgOq46dUzE6JFUpDENJ2mZXOEGx3MS92be70pFBPB3LJWLzOaEH4eB5uznFXSZ0pL95YQLSJFJaBQT8QkfLfCdMsohUs2NEJUnZI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755473190; c=relaxed/simple; bh=U6+1/JwouhTSJxSOzRu7o22xc0gJlnytRUaclnnNdWg=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=oxzkDtOT5yMDK0MNhogtNqplKXZBBAd/txj3QyhBXw8a5Ezzc2c0UCxGNRpggKBHZP8eKOul6AaFfCBG6yia0P91Tsd2CzE99ZzYqSvgzi4J0s0dFiIreS/HMdLqcGku44Ogbxk5LgCq5wsOwGCJVLTcsYNUTqXoHxmra2tN7Is= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A03E4385840C Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 527ADA0512; Mon, 18 Aug 2025 01:26:27 +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 uWE4LvAu87r0; Mon, 18 Aug 2025 01:26:27 +0200 (CEST) Received: from begin (97.22.205.77.rev.sfr.net [77.205.22.97]) (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 D0A3FA1C28; Mon, 18 Aug 2025 01:26:26 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1unmld-00000002wCO-3kSJ; Mon, 18 Aug 2025 01:26:25 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 7/7] htl: move sem_unlink into libc. Date: Mon, 18 Aug 2025 01:26:24 +0200 Message-ID: <20250817232624.700329-8-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250817232624.700329-1-samuel.thibault@ens-lyon.org> References: <20250817232624.700329-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.9 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: <20250817104023.91919-8-gfleury@disroot.org> --- htl/Makefile | 2 +- htl/Versions | 4 ++-- 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 - sysdeps/pthread/sem_unlink.c | 15 +++++++-------- 7 files changed, 14 insertions(+), 13 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 56b29e6bfd..979f290464 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -34,7 +34,6 @@ libpthread-routines := \ pt-spin \ pt-getname-np \ pt-setname-np \ - sem_unlink \ cancellation \ cthreads-compat \ herrno \ @@ -211,6 +210,7 @@ routines := \ sem_close \ sem_open \ sem_routines \ + sem_unlink \ # routines shared-only-routines = forward diff --git a/htl/Versions b/htl/Versions index c22b1b07f3..f5ea540def 100644 --- a/htl/Versions +++ b/htl/Versions @@ -109,6 +109,7 @@ libc { sem_post; sem_timedwait; sem_trywait; + sem_unlink; sem_wait; } @@ -239,6 +240,7 @@ libc { sem_post; sem_timedwait; sem_trywait; + sem_unlink; sem_wait; } @@ -332,8 +334,6 @@ libpthread { pthread_create; - sem_unlink; - pthread_spin_destroy; pthread_spin_init; pthread_spin_lock; pthread_spin_trylock; pthread_spin_unlock; __pthread_spin_destroy; __pthread_spin_init; diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 8eabddcec6..b3fe424501 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -136,6 +136,7 @@ GLIBC_2.12 sem_open F GLIBC_2.12 sem_post F GLIBC_2.12 sem_timedwait F GLIBC_2.12 sem_trywait F +GLIBC_2.12 sem_unlink F GLIBC_2.12 sem_wait F GLIBC_2.13 __fentry__ F GLIBC_2.14 syncfs F @@ -2685,6 +2686,7 @@ GLIBC_2.43 sem_open F GLIBC_2.43 sem_post F GLIBC_2.43 sem_timedwait F GLIBC_2.43 sem_trywait F +GLIBC_2.43 sem_unlink F GLIBC_2.43 sem_wait 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 483d792727..a05cacf93f 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -24,7 +24,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 sem_unlink F GLIBC_2.2.6 _IO_flockfile F GLIBC_2.2.6 _IO_ftrylockfile F GLIBC_2.2.6 _IO_funlockfile F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index de42acab3d..56da3c562b 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1768,6 +1768,7 @@ GLIBC_2.38 sem_open F GLIBC_2.38 sem_post F GLIBC_2.38 sem_timedwait F GLIBC_2.38 sem_trywait F +GLIBC_2.38 sem_unlink F GLIBC_2.38 sem_wait F GLIBC_2.38 semctl F GLIBC_2.38 semget F @@ -2366,6 +2367,7 @@ GLIBC_2.43 sem_open F GLIBC_2.43 sem_post F GLIBC_2.43 sem_timedwait F GLIBC_2.43 sem_trywait F +GLIBC_2.43 sem_unlink F GLIBC_2.43 sem_wait 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 4c9ba3b7d5..0b1dcf1e8a 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_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 sem_unlink F GLIBC_2.38 thrd_create F GLIBC_2.38 thrd_detach F GLIBC_2.38 thrd_exit F diff --git a/sysdeps/pthread/sem_unlink.c b/sysdeps/pthread/sem_unlink.c index 428a93ae49..bf09bfd1a6 100644 --- a/sysdeps/pthread/sem_unlink.c +++ b/sysdeps/pthread/sem_unlink.c @@ -22,11 +22,7 @@ #include #include "semaphoreP.h" #include - -#if !PTHREAD_IN_LIBC -/* The private name is not exported from libc. */ -# define __unlink unlink -#endif +#include int __sem_unlink (const char *name) @@ -44,11 +40,14 @@ __sem_unlink (const char *name) __set_errno (EACCES); return ret; } -#if PTHREAD_IN_LIBC +#ifndef __PTHREAD_HTL versioned_symbol (libc, __sem_unlink, sem_unlink, GLIBC_2_34); # if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_1_1, GLIBC_2_34) compat_symbol (libpthread, __sem_unlink, sem_unlink, GLIBC_2_1_1); # endif -#else /* !PTHREAD_IN_LIBC */ -strong_alias (__sem_unlink, sem_unlink) +#else /* __PTHREAD_HTL */ +versioned_symbol (libc, __sem_unlink, sem_unlink, GLIBC_2_43); +# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libpthread, __sem_unlink, sem_unlink, GLIBC_2_12); +#endif #endif