From patchwork Wed Jan 29 01:33:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 105586 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 7C6093857B91 for ; Wed, 29 Jan 2025 01:38:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7C6093857B91 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 9B8B13857C7B for ; Wed, 29 Jan 2025 01:33:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9B8B13857C7B 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 9B8B13857C7B 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=1738114436; cv=none; b=ah0/1SkKmfDuskiUZGSaf82OICop1yFGwpFUnr3OBU6NCyLzhrzcAynfOaaSW3Yipwozts5F/N3l6jmbnDTZI/CMXfQ1QJngIqywtwxLoKHH9+1FmcPnPdXp59HNwfcVdLv0ulHrYAdDlyCU4+ZMdImOSJRQO6j7AXNZhjThoTg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1738114436; c=relaxed/simple; bh=94SCdamXi1szJDCw6s3BTolBnjRbsK2cNNJKS+kbD58=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=ff/Nql4ryG5c1qOl/Kso4DFE+OhojGjY0nK4slFpFshCGico1TZFb2ujsA9UKNkQ/vA8NiXBdffV7PGCwgBVWZZQ1vg1jAxg5ETQjYUBNBxTebglgfeb/ozlEjibR73i+WDx3a5CmVYmR9OzUMIPCUtnIVcmS/M0RrigLRfD8dI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9B8B13857C7B Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id BB67EA19BA; Wed, 29 Jan 2025 02:33:44 +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 au-LuiJhIbY2; Wed, 29 Jan 2025 02:33:44 +0100 (CET) Received: from begin (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 48E71A49C6; Wed, 29 Jan 2025 02:33:44 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1tcwxb-0000000AtU7-3KtJ; Wed, 29 Jan 2025 02:33:43 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd, commited 6/7] htl: move pthread_mutex_consistent, pthread_mutex_consistent_np into libc. Date: Wed, 29 Jan 2025 02:33:41 +0100 Message-ID: <20250129013342.2596522-7-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250129013342.2596522-1-samuel.thibault@ens-lyon.org> References: <20250129013342.2596522-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: <20250103103750.870897-6-gfleury@disroot.org> --- htl/Makefile | 2 +- htl/Versions | 5 +++-- sysdeps/htl/pthreadP.h | 2 ++ sysdeps/mach/hurd/htl/pt-mutex-consistent.c | 15 +++++++++++---- sysdeps/mach/hurd/i386/libc.abilist | 4 ++++ sysdeps/mach/hurd/i386/libpthread.abilist | 2 -- sysdeps/mach/hurd/x86_64/libc.abilist | 4 ++++ sysdeps/mach/hurd/x86_64/libpthread.abilist | 2 -- 8 files changed, 25 insertions(+), 11 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index f6abd95772..5b0b6023b0 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -55,7 +55,6 @@ libpthread-routines := \ pt-testcancel \ pt-cancel \ pt-mutex-transfer-np \ - pt-mutex-consistent \ pt-rwlock-attr \ pt-rwlockattr-init \ pt-rwlockattr-destroy \ @@ -181,6 +180,7 @@ routines := \ pt-condattr-setpshared \ pt-getschedparam \ pt-mutex-checklocked \ + pt-mutex-consistent \ pt-mutex-destroy \ pt-mutex-getprioceiling \ pt-mutex-init \ diff --git a/htl/Versions b/htl/Versions index 9cd9f5a937..2ebf554cfa 100644 --- a/htl/Versions +++ b/htl/Versions @@ -89,6 +89,8 @@ libc { pthread_mutex_clocklock; + pthread_mutex_consistent; pthread_mutex_consistent_np; + pthread_mutexattr_getrobust; pthread_mutexattr_getrobust_np; pthread_mutexattr_setrobust; pthread_mutexattr_setrobust_np; } @@ -120,6 +122,7 @@ libc { } GLIBC_2.42 { + pthread_mutex_consistent; pthread_mutex_consistent_np; pthread_mutex_getprioceiling; pthread_mutex_setprioceiling; pthread_mutex_trylock; @@ -257,8 +260,6 @@ libpthread { cnd_broadcast; cnd_destroy; cnd_init; cnd_signal; cnd_timedwait; cnd_wait; tss_create; tss_delete; tss_get; tss_set; - pthread_mutex_consistent; pthread_mutex_consistent_np; - pthread_rwlock_clockrdlock; pthread_rwlock_clockwrlock; pthread_tryjoin_np; pthread_timedjoin_np; pthread_clockjoin_np; diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index f8aab6af9e..c39c7f117b 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -36,6 +36,8 @@ libc_hidden_proto (__pthread_mutex_init) extern int __pthread_mutex_clocklock (pthread_mutex_t *__mutex, clockid_t __clockid, const struct timespec *__abstime); libc_hidden_proto (__pthread_mutex_clocklock) +extern int __pthread_mutex_consistent (pthread_mutex_t *__mtxp); +libc_hidden_proto (__pthread_mutex_consistent) extern int __pthread_mutex_lock (pthread_mutex_t *__mutex); libc_hidden_proto (__pthread_mutex_lock) extern int __pthread_mutex_getprioceiling (const pthread_mutex_t *__mutex, diff --git a/sysdeps/mach/hurd/htl/pt-mutex-consistent.c b/sysdeps/mach/hurd/htl/pt-mutex-consistent.c index ab9edd8a1c..5aa75d15bd 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-consistent.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-consistent.c @@ -16,16 +16,17 @@ License along with the GNU C Library; if not, see . */ -#include +#include #include #include #include #include "pt-mutex.h" #include #include +#include int -pthread_mutex_consistent (pthread_mutex_t *mtxp) +__pthread_mutex_consistent (pthread_mutex_t *mtxp) { int ret = EINVAL; unsigned int val = mtxp->__lock; @@ -44,5 +45,11 @@ pthread_mutex_consistent (pthread_mutex_t *mtxp) return ret; } - -weak_alias (pthread_mutex_consistent, pthread_mutex_consistent_np) +libc_hidden_def (__pthread_mutex_consistent) +versioned_symbol (libc, __pthread_mutex_consistent, pthread_mutex_consistent, GLIBC_2_42); +versioned_symbol (libc, __pthread_mutex_consistent, pthread_mutex_consistent_np, GLIBC_2_42); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_32, GLIBC_2_42) +compat_symbol (libpthread, __pthread_mutex_consistent,pthread_mutex_consistent, GLIBC_2_32); +compat_symbol (libpthread, __pthread_mutex_consistent,pthread_mutex_consistent_np, GLIBC_2_32); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index f153f475c3..17656eb119 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -2272,6 +2272,8 @@ GLIBC_2.32 mach_print F GLIBC_2.32 mremap F GLIBC_2.32 pthread_cond_clockwait F GLIBC_2.32 pthread_mutex_clocklock F +GLIBC_2.32 pthread_mutex_consistent F +GLIBC_2.32 pthread_mutex_consistent_np F GLIBC_2.32 pthread_mutexattr_getrobust F GLIBC_2.32 pthread_mutexattr_getrobust_np F GLIBC_2.32 pthread_mutexattr_setrobust F @@ -2557,6 +2559,8 @@ GLIBC_2.41 pthread_mutexattr_setrobust F GLIBC_2.41 pthread_mutexattr_setrobust_np F GLIBC_2.41 pthread_mutexattr_settype F GLIBC_2.41 pthread_sigmask F +GLIBC_2.42 pthread_mutex_consistent F +GLIBC_2.42 pthread_mutex_consistent_np F GLIBC_2.42 pthread_mutex_getprioceiling F GLIBC_2.42 pthread_mutex_setprioceiling F GLIBC_2.42 pthread_mutex_trylock F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 53b433c725..0877c0a84b 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -99,8 +99,6 @@ GLIBC_2.32 mtx_timedlock F GLIBC_2.32 mtx_trylock F GLIBC_2.32 mtx_unlock F GLIBC_2.32 pthread_clockjoin_np F -GLIBC_2.32 pthread_mutex_consistent F -GLIBC_2.32 pthread_mutex_consistent_np F GLIBC_2.32 pthread_rwlock_clockrdlock F GLIBC_2.32 pthread_rwlock_clockwrlock F GLIBC_2.32 pthread_timedjoin_np F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index bdb89fb41d..4f7ba3a700 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1548,6 +1548,8 @@ GLIBC_2.38 pthread_equal F GLIBC_2.38 pthread_exit F GLIBC_2.38 pthread_getschedparam F GLIBC_2.38 pthread_mutex_clocklock F +GLIBC_2.38 pthread_mutex_consistent F +GLIBC_2.38 pthread_mutex_consistent_np F GLIBC_2.38 pthread_mutex_destroy F GLIBC_2.38 pthread_mutex_getprioceiling F GLIBC_2.38 pthread_mutex_init F @@ -2242,6 +2244,8 @@ GLIBC_2.41 pthread_mutexattr_setrobust F GLIBC_2.41 pthread_mutexattr_setrobust_np F GLIBC_2.41 pthread_mutexattr_settype F GLIBC_2.41 pthread_sigmask F +GLIBC_2.42 pthread_mutex_consistent F +GLIBC_2.42 pthread_mutex_consistent_np F GLIBC_2.42 pthread_mutex_getprioceiling F GLIBC_2.42 pthread_mutex_setprioceiling F GLIBC_2.42 pthread_mutex_trylock F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index 5f0f73d10f..f4cee89580 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -61,8 +61,6 @@ GLIBC_2.38 pthread_join F GLIBC_2.38 pthread_key_create F GLIBC_2.38 pthread_key_delete F GLIBC_2.38 pthread_kill F -GLIBC_2.38 pthread_mutex_consistent F -GLIBC_2.38 pthread_mutex_consistent_np F GLIBC_2.38 pthread_mutex_transfer_np F GLIBC_2.38 pthread_once F GLIBC_2.38 pthread_rwlock_clockrdlock F