From patchwork Tue Nov 19 00:56:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 101483 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 D1DE33858C56 for ; Tue, 19 Nov 2024 00:59:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D1DE33858C56 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 17C40385841E for ; Tue, 19 Nov 2024 00:56:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 17C40385841E 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 17C40385841E 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=1731977813; cv=none; b=P94QkkkWeeeqpOZ1327bqP9sB4kDTM/oUi7/TH/LcbTATR9YDEUGreFJCKBLrBW8zAeShII1ss0v6inYu+PS7f8meFDvFgwXq8rNoL06cG2ONWhx+QdBD0oBEX3SIY+aXLw19JhxyBZb+KMh9HJODGZt7uWIgphxy32Ttb2YvWQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731977813; c=relaxed/simple; bh=Iiy0YkBeyWrGKhMfGOo5/W1q0czpKsMA8QaDfUqNoK8=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=BJmF7HTsw6pfGnYdHxLeduukdpkVnR7FnlCWL01VvWyAqfmzeLRPkqAUtFxKb67i2z2ks2dxnxrq6gTLN+zYUJTy88AidT+orpLmTiWGd8zv2fJlYxDoKxNwi20G+AQUH8OZ96tvpYdSdY8wV8yNkLqbUGReEoikBCIDmKcvwh0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 678ECA1BE9; Tue, 19 Nov 2024 01:56:37 +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 UsE6aYGO3zqB; Tue, 19 Nov 2024 01:56:37 +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 C076FA1C8F; Tue, 19 Nov 2024 01:56:36 +0100 (CET) Received: from samy by begin with local (Exim 4.98) (envelope-from ) id 1tDCXk-0000000CrP4-0x4i; Tue, 19 Nov 2024 01:56:36 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd, commited 11/13] htl: move pthread_attr_setschedparam into libc. Date: Tue, 19 Nov 2024 01:56:32 +0100 Message-ID: <20241119005634.3065147-12-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> References: <20241119005634.3065147-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.2 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 --- htl/Makefile | 2 +- htl/Versions | 2 +- htl/forward.c | 4 ---- htl/pt-initialize.c | 1 - sysdeps/htl/pt-attr-setschedparam.c | 7 +++++-- sysdeps/htl/pthread-functions.h | 4 ---- sysdeps/mach/hurd/i386/libc.abilist | 1 + sysdeps/mach/hurd/i386/libpthread.abilist | 1 - sysdeps/mach/hurd/x86_64/libpthread.abilist | 1 - 9 files changed, 8 insertions(+), 15 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index eae1c70958..555ab9b8cd 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -27,7 +27,6 @@ LCLHDRS := libpthread-routines := \ pt-attr-init \ pt-attr-setguardsize \ - pt-attr-setschedparam \ pt-barrier-destroy \ pt-barrier-init \ pt-barrier-wait \ @@ -201,6 +200,7 @@ routines := \ pt-attr-getstacksize \ pt-attr-setdetachstate \ pt-attr-setinheritsched \ + pt-attr-setschedparam \ pt-attr-setschedpolicy \ pt-attr-setscope \ pt-attr-setstack \ diff --git a/htl/Versions b/htl/Versions index 01f9f27a37..8ecb2fd880 100644 --- a/htl/Versions +++ b/htl/Versions @@ -23,6 +23,7 @@ libc { pthread_attr_setstackaddr; pthread_attr_setstack; pthread_attr_setscope; + pthread_attr_setschedparam; } GLIBC_2.21 { @@ -107,7 +108,6 @@ libpthread { pthread_attr_init; pthread_attr_setguardsize; - pthread_attr_setschedparam; pthread_barrier_destroy; pthread_barrier_init; pthread_barrier_wait; pthread_barrierattr_destroy; pthread_barrierattr_getpshared; diff --git a/htl/forward.c b/htl/forward.c index 105b46cfea..179ec60bc5 100644 --- a/htl/forward.c +++ b/htl/forward.c @@ -55,10 +55,6 @@ name decl \ FORWARD (pthread_attr_init, (pthread_attr_t *attr), (attr), 0) -FORWARD (pthread_attr_setschedparam, - (pthread_attr_t *attr, const struct sched_param *param), - (attr, param), 0) - FORWARD (pthread_condattr_destroy, (pthread_condattr_t *attr), (attr), 0) FORWARD (pthread_condattr_init, (pthread_condattr_t *attr), (attr), 0) diff --git a/htl/pt-initialize.c b/htl/pt-initialize.c index 80afc5e86a..835d741215 100644 --- a/htl/pt-initialize.c +++ b/htl/pt-initialize.c @@ -28,7 +28,6 @@ #if IS_IN (libpthread) static const struct pthread_functions pthread_functions = { .ptr_pthread_attr_init = __pthread_attr_init, - .ptr_pthread_attr_setschedparam = __pthread_attr_setschedparam, .ptr_pthread_condattr_destroy = __pthread_condattr_destroy, .ptr_pthread_condattr_init = __pthread_condattr_init, .ptr_pthread_cond_broadcast = __pthread_cond_broadcast, diff --git a/sysdeps/htl/pt-attr-setschedparam.c b/sysdeps/htl/pt-attr-setschedparam.c index 39a9cdf5ed..a60952fbb3 100644 --- a/sysdeps/htl/pt-attr-setschedparam.c +++ b/sysdeps/htl/pt-attr-setschedparam.c @@ -19,7 +19,7 @@ #include #include #include - +#include #include int @@ -34,5 +34,8 @@ __pthread_attr_setschedparam (pthread_attr_t *attr, return ENOTSUP; } +versioned_symbol (libc, __pthread_attr_setschedparam, pthread_attr_setschedparam, GLIBC_2_21); -weak_alias (__pthread_attr_setschedparam, pthread_attr_setschedparam); +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21) +compat_symbol (libc, __pthread_attr_setschedparam, pthread_attr_setschedparam, GLIBC_2_12); +#endif diff --git a/sysdeps/htl/pthread-functions.h b/sysdeps/htl/pthread-functions.h index 1c691db6f3..17c97ef200 100644 --- a/sysdeps/htl/pthread-functions.h +++ b/sysdeps/htl/pthread-functions.h @@ -22,8 +22,6 @@ #include int __pthread_attr_init (pthread_attr_t *); -int __pthread_attr_setschedparam (pthread_attr_t *, - const struct sched_param *); int __pthread_condattr_destroy (pthread_condattr_t *); int __pthread_condattr_init (pthread_condattr_t *); int __pthread_cond_broadcast (pthread_cond_t *); @@ -62,8 +60,6 @@ int _cthreads_ftrylockfile (FILE *); struct pthread_functions { int (*ptr_pthread_attr_init) (pthread_attr_t *); - int (*ptr_pthread_attr_setschedparam) (pthread_attr_t *, - const struct sched_param *); int (*ptr_pthread_condattr_destroy) (pthread_condattr_t *); int (*ptr_pthread_condattr_init) (pthread_condattr_t *); int (*ptr_pthread_cond_broadcast) (pthread_cond_t *); diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 1c3d33821f..8fd21e66a1 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -41,6 +41,7 @@ GLIBC_2.12 pthread_attr_getstackaddr F GLIBC_2.12 pthread_attr_getstacksize F GLIBC_2.12 pthread_attr_setdetachstate F GLIBC_2.12 pthread_attr_setinheritsched F +GLIBC_2.12 pthread_attr_setschedparam F GLIBC_2.12 pthread_attr_setschedpolicy F GLIBC_2.12 pthread_attr_setscope F GLIBC_2.12 pthread_attr_setstack F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 83e3a06dc3..ea40657e1d 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -24,7 +24,6 @@ GLIBC_2.12 funlockfile F GLIBC_2.12 pthread_atfork F GLIBC_2.12 pthread_attr_init F GLIBC_2.12 pthread_attr_setguardsize F -GLIBC_2.12 pthread_attr_setschedparam F GLIBC_2.12 pthread_barrier_destroy F GLIBC_2.12 pthread_barrier_init F GLIBC_2.12 pthread_barrier_wait F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index b4f54f5f5d..eef91700e9 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -41,7 +41,6 @@ GLIBC_2.38 mtx_trylock F GLIBC_2.38 mtx_unlock F GLIBC_2.38 pthread_attr_init F GLIBC_2.38 pthread_attr_setguardsize F -GLIBC_2.38 pthread_attr_setschedparam F GLIBC_2.38 pthread_barrier_destroy F GLIBC_2.38 pthread_barrier_init F GLIBC_2.38 pthread_barrier_wait F