From patchwork Sat Aug 16 00:13:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118437 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 E1163385840C for ; Sat, 16 Aug 2025 00:15:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E1163385840C 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 7931B3858C53 for ; Sat, 16 Aug 2025 00:14:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7931B3858C53 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 7931B3858C53 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=1755303248; cv=none; b=SdGcK5PbqEfKW+Zr/6PZ3EXAjZR7UhGseS1yFI8LkniLUoJqd4Kfnm+UjJlsSW8NK6pRk4XcRZGPITKODa6xxVwY+ADmWLN5VAFQQWCq+nwqZdsS903ldOmCwnJhM6pVrQO+h5HjgXMyQ3kfsj8oladaT/qGZr/OfXOkhNX9+SI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303248; c=relaxed/simple; bh=DDtKZHwcg8JG3qF8c40blhhO3hJqowi4ddaX2PANCt8=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=pyPuMKWOk61FT+b3VWjVwLkH3NvXcRTKcOp6FBy+wN09y8Lz1ajSdRmhS/LJJ45K+mR5/U/PmTJCHmWpougJJ0EHdC8k43Z0pEIsvUT8WVvf9YXRzEudFritjYmsLcAznc2w/Jxuviv18N26y/GvKihrnRncUCXfFj1tP09rULs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7931B3858C53 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 69C67A5DC0; Sat, 16 Aug 2025 02:14:07 +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 g_LKQfPCZuax; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from begin (165.21.205.77.rev.sfr.net [77.205.21.165]) (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 1B594A49A3; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yf-00000000Wv1-3ZLU; Sat, 16 Aug 2025 02:14:05 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 01/19] htl: move pthread_setschedprio into libc. Date: Sat, 16 Aug 2025 02:13:47 +0200 Message-ID: <20250816001405.126154-2-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> References: <20250816001405.126154-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 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: <20250815181500.107433-2-gfleury@disroot.org> --- htl/Makefile | 2 +- htl/Versions | 6 +++++- sysdeps/htl/pt-setschedprio.c | 9 ++++++++- sysdeps/htl/pthreadP.h | 3 +++ 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, 21 insertions(+), 5 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 82b7803c88..0f9e567faa 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -55,7 +55,6 @@ libpthread-routines := \ pt-sigstate-init \ pt-kill \ pt-getcpuclockid \ - pt-setschedprio \ pt-yield \ pt-getname-np \ pt-setname-np \ @@ -204,6 +203,7 @@ routines := \ pt-setcancelstate \ pt-setcanceltype \ pt-setschedparam \ + pt-setschedprio \ pt-setspecific \ pt-sigmask \ pt-sigstate \ diff --git a/htl/Versions b/htl/Versions index 40ee2748a7..57041917aa 100644 --- a/htl/Versions +++ b/htl/Versions @@ -84,6 +84,7 @@ libc { pthread_rwlockattr_setpshared; pthread_setcancelstate; pthread_setcanceltype; + pthread_setschedprio; pthread_setspecific; pthread_sigmask; } @@ -186,6 +187,10 @@ libc { pthread_setspecific; } + GLIBC_2.43 { + pthread_setschedprio; + } + GLIBC_PRIVATE { __libc_alloca_cutoff; __libc_pthread_init; @@ -276,7 +281,6 @@ libpthread { pthread_mutex_transfer_np; pthread_setconcurrency; - pthread_setschedprio; pthread_testcancel; pthread_yield; diff --git a/sysdeps/htl/pt-setschedprio.c b/sysdeps/htl/pt-setschedprio.c index 7e1429c48f..198fcc88b0 100644 --- a/sysdeps/htl/pt-setschedprio.c +++ b/sysdeps/htl/pt-setschedprio.c @@ -18,11 +18,18 @@ #include #include +#include int -pthread_setschedprio (pthread_t thread, int prio) +__pthread_setschedprio (pthread_t thread, int prio) { return ENOSYS; } +libc_hidden_def (__pthread_setschedprio) +versioned_symbol (libc, __pthread_setschedprio, pthread_setschedprio, GLIBC_2_43); stub_warning (pthread_setschedprio) + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libc, __pthread_setschedprio, pthread_setschedprio, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 535740f5ea..384e39d211 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -138,6 +138,9 @@ extern int __pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, int __pshared); libc_hidden_proto (__pthread_rwlockattr_setpshared) +extern int __pthread_setschedprio (pthread_t __thr, int __prio); +libc_hidden_proto (__pthread_setschedprio) + extern int __pthread_cond_init (pthread_cond_t *cond, const pthread_condattr_t *cond_attr); libc_hidden_proto (__pthread_cond_init) diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index aac3cb3319..5ba3b7f356 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -111,6 +111,7 @@ GLIBC_2.12 pthread_self F GLIBC_2.12 pthread_setcancelstate F GLIBC_2.12 pthread_setcanceltype F GLIBC_2.12 pthread_setschedparam F +GLIBC_2.12 pthread_setschedprio F GLIBC_2.12 pthread_setspecific F GLIBC_2.12 pthread_sigmask F GLIBC_2.13 __fentry__ F @@ -2633,6 +2634,7 @@ GLIBC_2.42 uabs F GLIBC_2.42 uimaxabs F GLIBC_2.42 ulabs F GLIBC_2.42 ullabs F +GLIBC_2.43 pthread_setschedprio 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 9d2c4cd742..23df0ad6d1 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -31,7 +31,6 @@ GLIBC_2.12 pthread_join F GLIBC_2.12 pthread_kill F GLIBC_2.12 pthread_mutex_transfer_np F GLIBC_2.12 pthread_setconcurrency F -GLIBC_2.12 pthread_setschedprio F GLIBC_2.12 pthread_spin_destroy F GLIBC_2.12 pthread_spin_init F GLIBC_2.12 pthread_spin_lock F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 8f9d6aa842..06a85b5d40 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1603,6 +1603,7 @@ GLIBC_2.38 pthread_self F GLIBC_2.38 pthread_setcancelstate F GLIBC_2.38 pthread_setcanceltype F GLIBC_2.38 pthread_setschedparam F +GLIBC_2.38 pthread_setschedprio F GLIBC_2.38 pthread_setspecific F GLIBC_2.38 pthread_sigmask F GLIBC_2.38 ptrace F @@ -2315,6 +2316,7 @@ GLIBC_2.42 uabs F GLIBC_2.42 uimaxabs F GLIBC_2.42 ulabs F GLIBC_2.42 ullabs F +GLIBC_2.43 pthread_setschedprio 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 81d355a94b..21555b7bd8 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -51,7 +51,6 @@ GLIBC_2.38 pthread_join F GLIBC_2.38 pthread_kill F GLIBC_2.38 pthread_mutex_transfer_np F GLIBC_2.38 pthread_setconcurrency F -GLIBC_2.38 pthread_setschedprio F GLIBC_2.38 pthread_spin_destroy F GLIBC_2.38 pthread_spin_init F GLIBC_2.38 pthread_spin_lock F