From patchwork Tue Nov 18 14:02:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 124627 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 E69F0385AC3A for ; Tue, 18 Nov 2025 14:04:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E69F0385AC3A 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 182CA3857BA0 for ; Tue, 18 Nov 2025 14:02:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 182CA3857BA0 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 182CA3857BA0 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=1763474530; cv=none; b=k4dhF3uj8MQb+rMVASn+WEmqm6c4dAnJLwjCamzaNj5UUX0ADJvXR67W0xSf9uGZm1KGg2Ul9kD3Vqy+C82+BOBKth12o4cvS0P11d9nUoMUnpOnxpZTMwx5/PoloYSmtApjE3vSwjXJQBuwLf5Cp5kiSEXmFph0JByaWo8GR6Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1763474530; c=relaxed/simple; bh=UY9vH0rFyiFIDLOjUzVxVhYzWkluq0WCRwJReQSJNzY=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=f4KnNCvYG1X3uFiD3PPPJle0TWVm0zqXlPxhNJaG0Nkrno9mjmSC3iXpYyNq77VufbOdxPBIJQXPTN/LOwLLZy/kwdhaiHm7tZ7br41ikFhIcRSYUWxnQeBC0SyE9w+KYStHjeg2PWU0GjP1N1353+TVcEdi8Rn71CnDT98skF0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 182CA3857BA0 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 2AE5FA1DE5; Tue, 18 Nov 2025 15:02:09 +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 nm7Bgif5XPOE; Tue, 18 Nov 2025 15:02:09 +0100 (CET) Received: from end (nat-inria-interne-52-gw-01-bso.bordeaux.inria.fr [194.199.1.52]) (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 E00B8A2202; Tue, 18 Nov 2025 15:02:08 +0100 (CET) Received: from samy by end with local (Exim 4.99) (envelope-from ) id 1vLMHY-000000008C6-2K9c; Tue, 18 Nov 2025 15:02:08 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 1/3] htl: fix compatibility Date: Tue, 18 Nov 2025 15:02:06 +0100 Message-ID: <20251118140208.31475-2-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251118140208.31475-1-samuel.thibault@ens-lyon.org> References: <20251118140208.31475-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 This fix 91fb9914d867320d65a2abe284fb623d91ae5efb which break a system built with an old glibc Message-ID: <20251118125044.1160780-1-gfleury@disroot.org> --- htl/Versions | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htl/Versions b/htl/Versions index d46490b3a5..343de800b0 100644 --- a/htl/Versions +++ b/htl/Versions @@ -317,6 +317,10 @@ libc { } libpthread { + GLIBC_2.2.6 { + __libpthread_version_placeholder; + } + GLIBC_2.12 { pthread_atfork; From patchwork Tue Nov 18 14:02:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 124626 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 1B620385B538 for ; Tue, 18 Nov 2025 14:03:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1B620385B538 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 3776E385771D for ; Tue, 18 Nov 2025 14:02:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3776E385771D 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 3776E385771D 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=1763474530; cv=none; b=SjaUOuqa7fK//Txth8fZzIW1G6Vm11vkjMd1z3QIMZKSQynG/HZEasI6HNOUqBDXkNwKNOQyRPov+uD+PU/8cLzEA//DUvqgg9PQrmaQubehTj2UQOxbcFZuEPaLIxC6LwIn6Hqao/JN0gBA28jTptyEq+taJFsWjb1+0dlXf8s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1763474530; c=relaxed/simple; bh=2Rpfz/wfZJt/SL8MrAn7+Tb5iRqguOKfcbSD9nd8wDU=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=kYwg8d+Az+dTxPhRaJl+TyuItl0dHWHTVsOBm8IcH+pmrUxWmhLSI7uZ/VgJFXDPsXD6Z2+Tk6cdMP/ZNTZEkRP6X32tAwbLjDrlMnF5d4qon+WVmbWXzLO5v215UivkHXyES9pIXYxWaXpXvSM0CZSzp80YlpmlfJSHo0kK2Ec= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3776E385771D Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 03996A1BC7; Tue, 18 Nov 2025 15:02:09 +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 frDMPMixS03I; Tue, 18 Nov 2025 15:02:08 +0100 (CET) Received: from end (nat-inria-interne-52-gw-01-bso.bordeaux.inria.fr [194.199.1.52]) (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 D55ECA1C5C; Tue, 18 Nov 2025 15:02:08 +0100 (CET) Received: from samy by end with local (Exim 4.99) (envelope-from ) id 1vLMHY-000000008C9-2SEC; Tue, 18 Nov 2025 15:02:08 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd, commited 2/3] htl: move pthread_getname_np/setname_np into libc. Date: Tue, 18 Nov 2025 15:02:07 +0100 Message-ID: <20251118140208.31475-3-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251118140208.31475-1-samuel.thibault@ens-lyon.org> References: <20251118140208.31475-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: <20251118125044.1160780-2-gfleury@disroot.org> --- htl/Makefile | 4 ++-- htl/Versions | 10 ++++++++-- sysdeps/htl/pthreadP.h | 5 +++++ sysdeps/mach/htl/pt-getname-np.c | 10 +++++++++- sysdeps/mach/htl/pt-setname-np.c | 9 ++++++++- 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 -- 9 files changed, 40 insertions(+), 10 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index e59a7fff68..ee377463a1 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -29,8 +29,6 @@ libpthread-routines := \ pt-hurd-cond-wait \ pt-hurd-cond-timedwait \ pt-spin \ - pt-getname-np \ - pt-setname-np \ # libpthread-routine headers := \ @@ -122,6 +120,7 @@ routines := \ pt-getattr \ pt-getconcurrency \ pt-getcpuclockid \ + pt-getname-np \ pt-getschedparam \ pt-getspecific \ pt-init-specific \ @@ -174,6 +173,7 @@ routines := \ pt-setcancelstate \ pt-setcanceltype \ pt-setconcurrency \ + pt-setname-np \ pt-setschedparam \ pt-setschedprio \ pt-setspecific \ diff --git a/htl/Versions b/htl/Versions index 343de800b0..ed29636917 100644 --- a/htl/Versions +++ b/htl/Versions @@ -157,6 +157,11 @@ libc { sem_clockwait; } + GLIBC_2.40 { + pthread_getname_np; + pthread_setname_np; + } + GLIBC_2.41 { pthread_attr_getguardsize; pthread_attr_getstacksize; @@ -225,10 +230,12 @@ libc { pthread_getattr_np; pthread_getconcurrency; pthread_getcpuclockid; + pthread_getname_np; pthread_join; pthread_kill; pthread_mutex_transfer_np; pthread_setconcurrency; + pthread_setname_np; pthread_setschedprio; pthread_testcancel; pthread_timedjoin_np; @@ -345,7 +352,6 @@ libpthread { } GLIBC_2.40 { - pthread_getname_np; - pthread_setname_np; + __libpthread_version_placeholder; } } diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 5fb6469714..6ea1e79a92 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -225,6 +225,11 @@ int __pthread_setconcurrency (int __new_level); libc_hidden_proto (__pthread_setconcurrency) int __pthread_getconcurrency (void); libc_hidden_proto (__pthread_getconcurrency) +int __pthread_getname_np (pthread_t __target_thread, char *__buf, + size_t __buflen); +libc_hidden_proto (__pthread_getname_np) +int __pthread_setname_np (pthread_t __target_thread, const char *__name); +libc_hidden_proto (__pthread_setname_np) #define __pthread_raise_internal(__sig) raise (__sig) diff --git a/sysdeps/mach/htl/pt-getname-np.c b/sysdeps/mach/htl/pt-getname-np.c index 7b836b667a..8db4d40693 100644 --- a/sysdeps/mach/htl/pt-getname-np.c +++ b/sysdeps/mach/htl/pt-getname-np.c @@ -23,6 +23,9 @@ #include #include +#include +#include +#include int __pthread_getname_np (pthread_t thread, char *buf, size_t len) @@ -64,4 +67,9 @@ __pthread_getname_np (pthread_t thread, char *buf, size_t len) #endif } -weak_alias (__pthread_getname_np, pthread_getname_np) +libc_hidden_def (__pthread_getname_np) +versioned_symbol (libc, __pthread_getname_np, pthread_getname_np, GLIBC_2_43); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_40, GLIBC_2_43) +compat_symbol (libc, __pthread_getname_np, pthread_getname_np, GLIBC_2_40); +#endif diff --git a/sysdeps/mach/htl/pt-setname-np.c b/sysdeps/mach/htl/pt-setname-np.c index 58400c1edf..0a2a8df5cf 100644 --- a/sysdeps/mach/htl/pt-setname-np.c +++ b/sysdeps/mach/htl/pt-setname-np.c @@ -22,6 +22,8 @@ #include #include +#include +#include int __pthread_setname_np (pthread_t thread, const char *name) @@ -49,4 +51,9 @@ __pthread_setname_np (pthread_t thread, const char *name) #endif } -weak_alias (__pthread_setname_np, pthread_setname_np) +libc_hidden_def (__pthread_setname_np) +versioned_symbol (libc, __pthread_setname_np, pthread_setname_np, GLIBC_2_43); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_40, GLIBC_2_43) +compat_symbol (libpthread, __pthread_setname_np, pthread_setname_np, GLIBC_2_40); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index f7c323c834..a01535746f 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -2598,6 +2598,8 @@ GLIBC_2.4 readlinkat F GLIBC_2.4 renameat F GLIBC_2.4 symlinkat F GLIBC_2.4 unlinkat F +GLIBC_2.40 pthread_getname_np F +GLIBC_2.40 pthread_setname_np F GLIBC_2.41 pthread_attr_getguardsize F GLIBC_2.41 pthread_attr_getstack F GLIBC_2.41 pthread_attr_getstackaddr F @@ -2676,10 +2678,12 @@ GLIBC_2.43 pthread_detach F GLIBC_2.43 pthread_getattr_np F GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F +GLIBC_2.43 pthread_getname_np F GLIBC_2.43 pthread_join F GLIBC_2.43 pthread_kill F GLIBC_2.43 pthread_mutex_transfer_np F GLIBC_2.43 pthread_setconcurrency F +GLIBC_2.43 pthread_setname_np F GLIBC_2.43 pthread_setschedprio F GLIBC_2.43 pthread_testcancel F GLIBC_2.43 pthread_timedjoin_np F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index e1844a8f5e..318aa1a690 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -33,5 +33,3 @@ GLIBC_2.32 tss_create F GLIBC_2.32 tss_delete F GLIBC_2.32 tss_get F GLIBC_2.32 tss_set F -GLIBC_2.40 pthread_getname_np F -GLIBC_2.40 pthread_setname_np F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index b482d2d040..38261ba339 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -2276,6 +2276,8 @@ GLIBC_2.39 stdc_trailing_zeros_ui F GLIBC_2.39 stdc_trailing_zeros_ul F GLIBC_2.39 stdc_trailing_zeros_ull F GLIBC_2.39 stdc_trailing_zeros_us F +GLIBC_2.40 pthread_getname_np F +GLIBC_2.40 pthread_setname_np F GLIBC_2.41 pthread_attr_getguardsize F GLIBC_2.41 pthread_attr_getstack F GLIBC_2.41 pthread_attr_getstackaddr F @@ -2354,10 +2356,12 @@ GLIBC_2.43 pthread_detach F GLIBC_2.43 pthread_getattr_np F GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F +GLIBC_2.43 pthread_getname_np F GLIBC_2.43 pthread_join F GLIBC_2.43 pthread_kill F GLIBC_2.43 pthread_mutex_transfer_np F GLIBC_2.43 pthread_setconcurrency F +GLIBC_2.43 pthread_setname_np F GLIBC_2.43 pthread_setschedprio F GLIBC_2.43 pthread_testcancel F GLIBC_2.43 pthread_timedjoin_np F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index d4ae93df53..c9ad949d65 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -32,5 +32,3 @@ GLIBC_2.38 tss_create F GLIBC_2.38 tss_delete F GLIBC_2.38 tss_get F GLIBC_2.38 tss_set F -GLIBC_2.40 pthread_getname_np F -GLIBC_2.40 pthread_setname_np F From patchwork Tue Nov 18 14:02:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 124625 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 DF421385C6C9 for ; Tue, 18 Nov 2025 14:02:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF421385C6C9 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 3324A3857704 for ; Tue, 18 Nov 2025 14:02:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3324A3857704 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 3324A3857704 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=1763474530; cv=none; b=jZTz8okI+NLCmg7q1LI+cU+h+iIFn3ydylMUq/1nOu7d5TUtUX/O1hVjG1hSi7gRrZ8Ur11ofEjLOQ54Lp+pc/Xo9Yno8zMRC3vB/i486k3N38msiOM8c71CiqMXfIKH0A97fClrWppeQKnNsCgG76nFEFpV06fbLcDz33jiRh8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1763474530; c=relaxed/simple; bh=yHzA1uMgsX0ljKv6MWuVengJdZVPXwgbvfe5q2nnVKQ=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=MahKQOfEN+fq+iHlDoBzIZHr0PPXfFXkSphsJjAIvPk8X1oVczmLydTMkco3t39P5J2FfGC52/ay4UtjpWux2vd1UkZuTU9R8bzoZ/5hWSdnNXJX5JKMK5kSStD3ZMa3DY192bun7Sxq4q4s3QKnyDKM7CSs5TwF3zW3ItkeidI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3324A3857704 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 1FB66A1C5C; Tue, 18 Nov 2025 15:02:09 +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 J_b-_yxdYF_u; Tue, 18 Nov 2025 15:02:09 +0100 (CET) Received: from end (nat-inria-interne-52-gw-01-bso.bordeaux.inria.fr [194.199.1.52]) (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 DE20CA1DE5; Tue, 18 Nov 2025 15:02:08 +0100 (CET) Received: from samy by end with local (Exim 4.99) (envelope-from ) id 1vLMHY-000000008CC-2a9K; Tue, 18 Nov 2025 15:02:08 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd, commited 3/3] htl: move pthread_hurd_cond_timedwait_np, pthread_hurd_cond_wait_np into libc. Date: Tue, 18 Nov 2025 15:02:08 +0100 Message-ID: <20251118140208.31475-4-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251118140208.31475-1-samuel.thibault@ens-lyon.org> References: <20251118140208.31475-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: <20251118125044.1160780-3-gfleury@disroot.org> --- htl/Makefile | 4 ++-- htl/Versions | 10 +++++++--- sysdeps/mach/hurd/htl/pt-hurd-cond-timedwait.c | 7 ++++++- sysdeps/mach/hurd/htl/pt-hurd-cond-wait.c | 7 ++++++- 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, 29 insertions(+), 11 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index ee377463a1..9f14f15c41 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -26,8 +26,6 @@ LCLHDRS := libpthread-routines := \ pt-spin-inlines \ - pt-hurd-cond-wait \ - pt-hurd-cond-timedwait \ pt-spin \ # libpthread-routine @@ -123,6 +121,8 @@ routines := \ pt-getname-np \ pt-getschedparam \ pt-getspecific \ + pt-hurd-cond-timedwait \ + pt-hurd-cond-wait \ pt-init-specific \ pt-join \ pt-key-create \ diff --git a/htl/Versions b/htl/Versions index ed29636917..0eff9fd7be 100644 --- a/htl/Versions +++ b/htl/Versions @@ -127,7 +127,10 @@ libc { pthread_cond_init; pthread_cond_signal; pthread_cond_wait; pthread_cond_timedwait; pthread_equal; - pthread_exit; pthread_getschedparam; pthread_setschedparam; + pthread_exit; + pthread_hurd_cond_wait_np; + pthread_hurd_cond_timedwait_np; + pthread_getschedparam; pthread_setschedparam; pthread_mutex_destroy; pthread_mutex_init; pthread_mutex_lock; pthread_mutex_unlock; pthread_self; pthread_setcancelstate; pthread_setcanceltype; @@ -231,6 +234,8 @@ libc { pthread_getconcurrency; pthread_getcpuclockid; pthread_getname_np; + pthread_hurd_cond_wait_np; + pthread_hurd_cond_timedwait_np; pthread_join; pthread_kill; pthread_mutex_transfer_np; @@ -338,8 +343,7 @@ libpthread { _pthread_spin_lock; } GLIBC_2.21 { - pthread_hurd_cond_wait_np; - pthread_hurd_cond_timedwait_np; + __libpthread_version_placeholder; } GLIBC_2.32 { diff --git a/sysdeps/mach/hurd/htl/pt-hurd-cond-timedwait.c b/sysdeps/mach/hurd/htl/pt-hurd-cond-timedwait.c index a6c5597dfd..4903b8f8bd 100644 --- a/sysdeps/mach/hurd/htl/pt-hurd-cond-timedwait.c +++ b/sysdeps/mach/hurd/htl/pt-hurd-cond-timedwait.c @@ -22,6 +22,7 @@ #include #include +#include extern int __pthread_hurd_cond_timedwait_internal (pthread_cond_t *cond, pthread_mutex_t *mutex, @@ -36,7 +37,11 @@ __pthread_hurd_cond_timedwait_np (pthread_cond_t *cond, return __pthread_hurd_cond_timedwait_internal (cond, mutex, abstime); } -strong_alias (__pthread_hurd_cond_timedwait_np, pthread_hurd_cond_timedwait_np); +versioned_symbol (libc, __pthread_hurd_cond_timedwait_np, pthread_hurd_cond_timedwait_np, GLIBC_2_43); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_21, GLIBC_2_43) +compat_symbol (libpthread, __pthread_hurd_cond_timedwait_np, pthread_hurd_cond_timedwait_np, GLIBC_2_21); +#endif int __pthread_hurd_cond_timedwait_internal (pthread_cond_t *cond, diff --git a/sysdeps/mach/hurd/htl/pt-hurd-cond-wait.c b/sysdeps/mach/hurd/htl/pt-hurd-cond-wait.c index d6f541a1fe..fcfa7978d9 100644 --- a/sysdeps/mach/hurd/htl/pt-hurd-cond-wait.c +++ b/sysdeps/mach/hurd/htl/pt-hurd-cond-wait.c @@ -21,6 +21,7 @@ #include #include +#include /* Implemented in pt-hurd-cond-timedwait.c. */ extern int __pthread_hurd_cond_timedwait_internal (pthread_cond_t *cond, @@ -37,4 +38,8 @@ __pthread_hurd_cond_wait_np (pthread_cond_t *cond, pthread_mutex_t *mutex) return err == EINTR; } -strong_alias (__pthread_hurd_cond_wait_np, pthread_hurd_cond_wait_np); +versioned_symbol (libc, __pthread_hurd_cond_wait_np, pthread_hurd_cond_wait_np, GLIBC_2_43); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_21, GLIBC_2_43) +compat_symbol (libpthread, __pthread_hurd_cond_wait_np, pthread_hurd_cond_wait_np, GLIBC_2_21); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index a01535746f..6099178c9e 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -2110,6 +2110,8 @@ GLIBC_2.21 pthread_condattr_init F GLIBC_2.21 pthread_equal F GLIBC_2.21 pthread_exit F GLIBC_2.21 pthread_getschedparam F +GLIBC_2.21 pthread_hurd_cond_timedwait_np F +GLIBC_2.21 pthread_hurd_cond_wait_np F GLIBC_2.21 pthread_mutex_destroy F GLIBC_2.21 pthread_mutex_init F GLIBC_2.21 pthread_mutex_lock F @@ -2679,6 +2681,8 @@ GLIBC_2.43 pthread_getattr_np F GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F GLIBC_2.43 pthread_getname_np F +GLIBC_2.43 pthread_hurd_cond_timedwait_np F +GLIBC_2.43 pthread_hurd_cond_wait_np F GLIBC_2.43 pthread_join F GLIBC_2.43 pthread_kill F GLIBC_2.43 pthread_mutex_transfer_np F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 318aa1a690..24e6bd2c4a 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -10,8 +10,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.21 pthread_hurd_cond_timedwait_np F -GLIBC_2.21 pthread_hurd_cond_wait_np F GLIBC_2.32 call_once F GLIBC_2.32 cnd_broadcast F GLIBC_2.32 cnd_destroy F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 38261ba339..1aab058a9f 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -1565,6 +1565,8 @@ GLIBC_2.38 pthread_getconcurrency F GLIBC_2.38 pthread_getcpuclockid F GLIBC_2.38 pthread_getschedparam F GLIBC_2.38 pthread_getspecific F +GLIBC_2.38 pthread_hurd_cond_timedwait_np F +GLIBC_2.38 pthread_hurd_cond_wait_np F GLIBC_2.38 pthread_join F GLIBC_2.38 pthread_key_create F GLIBC_2.38 pthread_key_delete F @@ -2357,6 +2359,8 @@ GLIBC_2.43 pthread_getattr_np F GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F GLIBC_2.43 pthread_getname_np F +GLIBC_2.43 pthread_hurd_cond_timedwait_np F +GLIBC_2.43 pthread_hurd_cond_wait_np F GLIBC_2.43 pthread_join F GLIBC_2.43 pthread_kill F GLIBC_2.43 pthread_mutex_transfer_np F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index c9ad949d65..57d796482b 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -17,8 +17,6 @@ GLIBC_2.38 mtx_lock F GLIBC_2.38 mtx_timedlock F GLIBC_2.38 mtx_trylock F GLIBC_2.38 mtx_unlock F -GLIBC_2.38 pthread_hurd_cond_timedwait_np F -GLIBC_2.38 pthread_hurd_cond_wait_np F GLIBC_2.38 pthread_spin_destroy F GLIBC_2.38 pthread_spin_init F GLIBC_2.38 pthread_spin_lock F