From patchwork Sun Feb 16 23:03:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 106644 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 DD4F83858C48 for ; Sun, 16 Feb 2025 23:04:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD4F83858C48 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 9CF1F3858CD1 for ; Sun, 16 Feb 2025 23:03:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9CF1F3858CD1 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 9CF1F3858CD1 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=1739746994; cv=none; b=Xpv5MJGfbt9nXTMd9WjKyY80CqhjFgBFI5Fs93OfacDXJTGcj0HAnIUxQCgJWhlkRlxHc85w/t3RqSeua0tsYk4aOQV4UnAFVEswQR3ke0IM1z5q6QS1mHmM5PBBrVDxybbzHAREOFarLz9J018Ahi41oEcpaCBALmjeu0vF4fE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739746994; c=relaxed/simple; bh=+DTHL/jWOwjMiUuBWq6uddawcVBmcPrUYQ59WOnpvOE=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=c0bBJ+0YfIsiQHXjEWdvSQSsZJUAAk6lYeLPLFLqUApBtRIvh9UZIFnX0Yj2ODRwiOIy1m0okhBWIHhlOT5bUuxa9hZfoXoHEx8H84inU8cvYry2rNs269xUnuwTlo3hhhOUt7e0cisXMj4eftm9HDZbfhfjYQNYsf0mS4/2eZw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9CF1F3858CD1 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 8667FA5E29; Mon, 17 Feb 2025 00:03:13 +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 6G-fISO1Lf_J; Mon, 17 Feb 2025 00:03:13 +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 481E4A19A7; Mon, 17 Feb 2025 00:03:13 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1tjnfM-0000000D0X1-30mb; Mon, 17 Feb 2025 00:03:12 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 02/10] htl: move pthread_rwlockattr_init into libc. Date: Mon, 17 Feb 2025 00:03:02 +0100 Message-ID: <20250216230311.3097176-3-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250216230311.3097176-1-samuel.thibault@ens-lyon.org> References: <20250216230311.3097176-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, 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 Signed-off-by: gfleury Message-ID: <20250216145434.7089-3-gfleury@disroot.org> --- htl/Makefile | 2 +- htl/Versions | 4 +++- sysdeps/htl/pt-rwlockattr-init.c | 9 ++++++++- sysdeps/htl/pthreadP.h | 2 ++ 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, 18 insertions(+), 5 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 13215943d7..2d275dac1c 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -45,7 +45,6 @@ libpthread-routines := \ pt-testcancel \ pt-cancel \ pt-mutex-transfer-np \ - pt-rwlockattr-init \ pt-rwlockattr-destroy \ pt-rwlockattr-getpshared \ pt-rwlockattr-setpshared \ @@ -201,6 +200,7 @@ routines := \ pt-nthreads \ pt-pthread_self \ pt-rwlock-attr \ + pt-rwlockattr-init \ pt-self pt-equal \ pt-setcancelstate \ pt-setcanceltype \ diff --git a/htl/Versions b/htl/Versions index ff24da0190..c02ac04e22 100644 --- a/htl/Versions +++ b/htl/Versions @@ -63,6 +63,7 @@ libc { pthread_mutexattr_setprotocol; pthread_mutexattr_setpshared; pthread_mutexattr_settype; + pthread_rwlockattr_init; pthread_setcancelstate; pthread_setcanceltype; pthread_sigmask; @@ -142,6 +143,7 @@ libc { pthread_mutex_getprioceiling; pthread_mutex_setprioceiling; pthread_mutex_trylock; + pthread_rwlockattr_init; } GLIBC_PRIVATE { @@ -243,7 +245,7 @@ libpthread { pthread_rwlock_unlock; pthread_rwlock_wrlock; pthread_rwlockattr_destroy; pthread_rwlockattr_getpshared; - pthread_rwlockattr_init; pthread_rwlockattr_setpshared; + pthread_rwlockattr_setpshared; pthread_setconcurrency; pthread_setschedprio; pthread_setspecific; diff --git a/sysdeps/htl/pt-rwlockattr-init.c b/sysdeps/htl/pt-rwlockattr-init.c index 04a3ca62be..ce3f3c655d 100644 --- a/sysdeps/htl/pt-rwlockattr-init.c +++ b/sysdeps/htl/pt-rwlockattr-init.c @@ -18,12 +18,19 @@ #include #include +#include int -pthread_rwlockattr_init (pthread_rwlockattr_t *attr) +__pthread_rwlockattr_init (pthread_rwlockattr_t *attr) { ASSERT_TYPE_SIZE (pthread_rwlockattr_t, __SIZEOF_PTHREAD_RWLOCKATTR_T); *attr = __pthread_default_rwlockattr; return 0; } +libc_hidden_def (__pthread_rwlockattr_init) +versioned_symbol (libc, __pthread_rwlockattr_init, pthread_rwlockattr_init, GLIBC_2_42); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42) +compat_symbol (libpthread, __pthread_rwlockattr_init, pthread_rwlockattr_init, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 9ded2f8576..2f779d27cc 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -114,6 +114,8 @@ libc_hidden_proto (__pthread_mutexattr_gettype) extern int __pthread_mutexattr_settype(pthread_mutexattr_t *__attr, int __type); libc_hidden_proto (__pthread_mutexattr_settype) +extern int __pthread_rwlockattr_init (pthread_rwlockattr_t *__attr); +libc_hidden_proto (__pthread_rwlockattr_init) extern int __pthread_cond_init (pthread_cond_t *cond, const pthread_condattr_t *cond_attr); diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 0a100f876d..096ab46b38 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -88,6 +88,7 @@ GLIBC_2.12 pthread_mutexattr_setprioceiling F GLIBC_2.12 pthread_mutexattr_setprotocol F GLIBC_2.12 pthread_mutexattr_setpshared F GLIBC_2.12 pthread_mutexattr_settype F +GLIBC_2.12 pthread_rwlockattr_init F GLIBC_2.12 pthread_self F GLIBC_2.12 pthread_setcancelstate F GLIBC_2.12 pthread_setcanceltype F @@ -2580,6 +2581,7 @@ 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 +GLIBC_2.42 pthread_rwlockattr_init 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 d85b9d6912..7a20505888 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -47,7 +47,6 @@ GLIBC_2.12 pthread_rwlock_unlock F GLIBC_2.12 pthread_rwlock_wrlock F GLIBC_2.12 pthread_rwlockattr_destroy F GLIBC_2.12 pthread_rwlockattr_getpshared F -GLIBC_2.12 pthread_rwlockattr_init F GLIBC_2.12 pthread_rwlockattr_setpshared F GLIBC_2.12 pthread_setconcurrency F GLIBC_2.12 pthread_setschedprio F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 2266d3c846..d0010a3ce9 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1579,6 +1579,7 @@ GLIBC_2.38 pthread_mutexattr_setpshared F GLIBC_2.38 pthread_mutexattr_setrobust F GLIBC_2.38 pthread_mutexattr_setrobust_np F GLIBC_2.38 pthread_mutexattr_settype F +GLIBC_2.38 pthread_rwlockattr_init F GLIBC_2.38 pthread_self F GLIBC_2.38 pthread_setcancelstate F GLIBC_2.38 pthread_setcanceltype F @@ -2263,6 +2264,7 @@ 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 +GLIBC_2.42 pthread_rwlockattr_init 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 37b6190c13..a5f5b0a2c7 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -69,7 +69,6 @@ GLIBC_2.38 pthread_rwlock_unlock F GLIBC_2.38 pthread_rwlock_wrlock F GLIBC_2.38 pthread_rwlockattr_destroy F GLIBC_2.38 pthread_rwlockattr_getpshared F -GLIBC_2.38 pthread_rwlockattr_init F GLIBC_2.38 pthread_rwlockattr_setpshared F GLIBC_2.38 pthread_setconcurrency F GLIBC_2.38 pthread_setschedprio F