From patchwork Sun Aug 17 23:26: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: 118501 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 4C9B03858402 for ; Sun, 17 Aug 2025 23:28:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C9B03858402 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 487953858402 for ; Sun, 17 Aug 2025 23:26:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 487953858402 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 487953858402 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=r3oTt4Qg5ikp45QFjrISwkXeXTyaTnNLRA5idqvw7DFsEJDqncxQgj9D71BU/CamEvLnFlLlM9c2H2EA1Lnh7L7WOm9pWH63tf7TxRoZgFXCih/SzJWw5WBO/+vXmfkLugvSlPk0g+Sy+S6oRXYRsJkbgCMONFc2UnCB9nawneo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755473190; c=relaxed/simple; bh=V+v46BM9IID91oxtuUIKutM7aQBGzNV0b9xpv5HsCxQ=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=ezouk95nC4zDKT48e8ihOSRWYuJI4F6vw2GBOMWxMKe1PPuHKyI1ZF1T+41thCNXj7dnAjrYVOmJoX/2/kHniWYFMOitAIWRuaU8K2Ih2iP5UWpKARw2lLm6ynnU0wjgaIsrr51xQjjyfV+QSDX3duzYzSeJDRvhuYozrfwH3kQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 487953858402 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 3046FA0596; 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 0tXJfsLxWqzJ; 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 B028DA1BE0; Mon, 18 Aug 2025 01:26:26 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1unmld-00000002wCH-3IlQ; 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 5/7] htl: move sem_post into libc. Date: Mon, 18 Aug 2025 01:26:22 +0200 Message-ID: <20250817232624.700329-6-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-6-gfleury@disroot.org> --- htl/Makefile | 2 +- htl/Versions | 3 ++- sysdeps/htl/include/semaphore.h | 2 +- sysdeps/htl/sem-post.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 - 8 files changed, 14 insertions(+), 7 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 57327b3df4..b995d1a4b3 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -34,7 +34,6 @@ libpthread-routines := \ pt-spin \ pt-getname-np \ pt-setname-np \ - sem-post \ sem-timedwait \ sem-trywait \ sem_unlink \ @@ -208,6 +207,7 @@ routines := \ sem-destroy \ sem-getvalue \ sem-init \ + sem-post \ sem_close \ sem_open \ sem_routines \ diff --git a/htl/Versions b/htl/Versions index 5b83e1ce79..ff1d5b9348 100644 --- a/htl/Versions +++ b/htl/Versions @@ -106,6 +106,7 @@ libc { sem_getvalue; sem_init; sem_open; + sem_post; } GLIBC_2.21 { @@ -229,6 +230,7 @@ libc { sem_getvalue; sem_init; sem_open; + sem_post; } GLIBC_PRIVATE { @@ -321,7 +323,6 @@ libpthread { pthread_create; - sem_post; sem_timedwait; sem_trywait; sem_unlink; sem_wait; pthread_spin_destroy; pthread_spin_init; pthread_spin_lock; diff --git a/sysdeps/htl/include/semaphore.h b/sysdeps/htl/include/semaphore.h index 58fa2bf341..5e5d3c18e9 100644 --- a/sysdeps/htl/include/semaphore.h +++ b/sysdeps/htl/include/semaphore.h @@ -3,7 +3,7 @@ #ifndef _ISOMAC extern __typeof (sem_post) __sem_post; -libpthread_hidden_proto (__sem_post) +libc_hidden_proto (__sem_post) #endif #endif diff --git a/sysdeps/htl/sem-post.c b/sysdeps/htl/sem-post.c index 36f20f971b..419a5ec2c4 100644 --- a/sysdeps/htl/sem-post.c +++ b/sysdeps/htl/sem-post.c @@ -23,6 +23,7 @@ #include #include +#include int __sem_post (sem_t *sem) @@ -61,5 +62,8 @@ __sem_post (sem_t *sem) return 0; } -libpthread_hidden_def (__sem_post) -strong_alias (__sem_post, sem_post); +libc_hidden_def (__sem_post) +versioned_symbol (libc, __sem_post, sem_post, GLIBC_2_43); +# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libpthread, __sem_post, sem_post, GLIBC_2_12); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 9764b6053b..661bbf9532 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -133,6 +133,7 @@ GLIBC_2.12 sem_destroy F GLIBC_2.12 sem_getvalue F GLIBC_2.12 sem_init F GLIBC_2.12 sem_open F +GLIBC_2.12 sem_post F GLIBC_2.13 __fentry__ F GLIBC_2.14 syncfs F GLIBC_2.15 __fdelt_chk F @@ -2676,6 +2677,7 @@ GLIBC_2.43 sem_destroy F GLIBC_2.43 sem_getvalue F GLIBC_2.43 sem_init F GLIBC_2.43 sem_open F +GLIBC_2.43 sem_post 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 c7e8bc5a32..07dd75378e 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_post F GLIBC_2.12 sem_timedwait F GLIBC_2.12 sem_trywait F GLIBC_2.12 sem_unlink F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index e64bf542ef..6fa0e6f01a 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1764,6 +1764,7 @@ GLIBC_2.38 sem_destroy F GLIBC_2.38 sem_getvalue F GLIBC_2.38 sem_init F GLIBC_2.38 sem_open F +GLIBC_2.38 sem_post F GLIBC_2.38 semctl F GLIBC_2.38 semget F GLIBC_2.38 semop F @@ -2357,6 +2358,7 @@ GLIBC_2.43 sem_destroy F GLIBC_2.43 sem_getvalue F GLIBC_2.43 sem_init F GLIBC_2.43 sem_open F +GLIBC_2.43 sem_post 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 ee0fac300c..38cf0d2595 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -44,7 +44,6 @@ 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_clockwait 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