From patchwork Sat Aug 16 00:13:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 118444 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 B919A3858C2A for ; Sat, 16 Aug 2025 00:22:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B919A3858C2A 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 2032C3858401 for ; Sat, 16 Aug 2025 00:14:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2032C3858401 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 2032C3858401 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=1755303262; cv=none; b=lHl96Ibq8hhGxXDFOYE6XhLKztNlW5Ed1yYZSRqdoR9cJLR++LPfQOAWJ6kFxm8Ph9qbr31Q8PTAJR+BJymk3D99ULmphFlZwlGQ6H8nTPzxJ6utxNfp8LMOIeQgScQCiPaYir1z6uPtbGERYndxlJFOIt5MdCAhVgeDT95oo44= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755303262; c=relaxed/simple; bh=h95LBz5x3xVHtXRa6/lApr4wIlxm0DLM5YtbfwJ0F1k=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=ngfS1XJ6HnQhXqzv1AIo8N+z4UYGE2dLA0OLtMe3WLp2m981631rcVPLdGHfbAam1QWvJ1IAg7b3JCC0+u+YVjR1rF3uupv5BhPUTdcjAlxBoMoGOf+Jgz1bVu7XI7wccu4boYo9oMgu9Jv4RyVEIBBC3BIIUuBAjXPWYtCa3no= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2032C3858401 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 2FCD2A5DC3; Sat, 16 Aug 2025 02:14:08 +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 yVceN630OzoY; Sat, 16 Aug 2025 02:14:08 +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 7C2B4A49A3; Sat, 16 Aug 2025 02:14:07 +0200 (CEST) Received: from samy by begin with local (Exim 4.98.2) (envelope-from ) id 1un4Yg-00000000Wy4-2oSK; Sat, 16 Aug 2025 02:14:06 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: gfleury , commit-hurd@gnu.org Subject: [hurd,commited 10/19] htl: move pthread_kill into libc. Date: Sat, 16 Aug 2025 02:13:56 +0200 Message-ID: <20250816001405.126154-11-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=-13.5 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-11-gfleury@disroot.org> --- htl/Makefile | 2 +- htl/Versions | 6 +++--- sysdeps/hurd/htl/pt-kill.c | 9 ++++++++- sysdeps/mach/hurd/i386/libc.abilist | 3 +++ sysdeps/mach/hurd/i386/libpthread.abilist | 2 -- sysdeps/mach/hurd/x86_64/libc.abilist | 3 +++ sysdeps/mach/hurd/x86_64/libpthread.abilist | 2 -- 7 files changed, 18 insertions(+), 9 deletions(-) diff --git a/htl/Makefile b/htl/Makefile index 3ec68aa842..0acd3a8868 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -41,7 +41,6 @@ libpthread-routines := \ pt-setup \ pt-spin \ pt-sigstate-init \ - pt-kill \ pt-getname-np \ pt-setname-np \ sem_close \ @@ -153,6 +152,7 @@ routines := \ pt-init-specific \ pt-key-create \ pt-key-delete \ + pt-kill \ pt-machdep \ pt-mutex-checklocked \ pt-mutex-consistent \ diff --git a/htl/Versions b/htl/Versions index 078aa8b33a..06977e677b 100644 --- a/htl/Versions +++ b/htl/Versions @@ -4,6 +4,7 @@ libc { pthread_self; __pthread_get_cleanup_stack; __pthread_key_create; + __pthread_kill; __pthread_self; pthread_attr_getdetachstate; pthread_attr_getinheritsched; @@ -53,6 +54,7 @@ libc { pthread_getconcurrency; pthread_key_create; pthread_key_delete; + pthread_kill; pthread_mutex_destroy; pthread_mutex_getprioceiling; pthread_mutex_init; @@ -196,6 +198,7 @@ libc { pthread_cancel; pthread_getconcurrency; pthread_getcpuclockid; + pthread_kill; pthread_setconcurrency; pthread_setschedprio; pthread_yield; @@ -291,9 +294,6 @@ libpthread { pthread_join; - pthread_kill; - __pthread_kill; - pthread_mutex_transfer_np; pthread_testcancel; diff --git a/sysdeps/hurd/htl/pt-kill.c b/sysdeps/hurd/htl/pt-kill.c index 77be247f2b..f3a283f284 100644 --- a/sysdeps/hurd/htl/pt-kill.c +++ b/sysdeps/hurd/htl/pt-kill.c @@ -22,6 +22,8 @@ #include #include +#include +#include int __pthread_kill (pthread_t thread, int sig) @@ -52,4 +54,9 @@ __pthread_kill (pthread_t thread, int sig) __spin_lock (&ss->lock); return _hurd_raise_signal (ss, sig, &detail); } -strong_alias (__pthread_kill, pthread_kill) + +versioned_symbol (libc, __pthread_kill, pthread_kill, GLIBC_2_43); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43) +compat_symbol (libpthread, __pthread_kill, pthread_kill, GLIBC_2_12); +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 1128ca2496..6056958fcd 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -30,6 +30,7 @@ GLIBC_2.11 mkstemps F GLIBC_2.11 mkstemps64 F GLIBC_2.12 __pthread_get_cleanup_stack F GLIBC_2.12 __pthread_key_create F +GLIBC_2.12 __pthread_kill F GLIBC_2.12 __pthread_self F GLIBC_2.12 pthread_attr_destroy F GLIBC_2.12 pthread_attr_getdetachstate F @@ -78,6 +79,7 @@ GLIBC_2.12 pthread_getschedparam F GLIBC_2.12 pthread_getspecific F GLIBC_2.12 pthread_key_create F GLIBC_2.12 pthread_key_delete F +GLIBC_2.12 pthread_kill F GLIBC_2.12 pthread_mutex_destroy F GLIBC_2.12 pthread_mutex_getprioceiling F GLIBC_2.12 pthread_mutex_init F @@ -2642,6 +2644,7 @@ GLIBC_2.42 ullabs F GLIBC_2.43 pthread_cancel F GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F +GLIBC_2.43 pthread_kill F GLIBC_2.43 pthread_setconcurrency F GLIBC_2.43 pthread_setschedprio F GLIBC_2.43 pthread_yield F diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 3c7c8d9398..afb9e6064d 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -1,6 +1,5 @@ GLIBC_2.12 __mutex_lock_solid F GLIBC_2.12 __mutex_unlock_solid F -GLIBC_2.12 __pthread_kill F GLIBC_2.12 __pthread_mutex_transfer_np F GLIBC_2.12 __pthread_spin_destroy F GLIBC_2.12 __pthread_spin_init F @@ -25,7 +24,6 @@ GLIBC_2.12 pthread_detach F GLIBC_2.12 pthread_exit F GLIBC_2.12 pthread_getattr_np F GLIBC_2.12 pthread_join F -GLIBC_2.12 pthread_kill F GLIBC_2.12 pthread_mutex_transfer_np F GLIBC_2.12 pthread_spin_destroy F GLIBC_2.12 pthread_spin_init F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 8b5d0c8871..b17e1980b5 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -393,6 +393,7 @@ GLIBC_2.38 __progname D 0x8 GLIBC_2.38 __progname_full D 0x8 GLIBC_2.38 __pthread_get_cleanup_stack F GLIBC_2.38 __pthread_key_create F +GLIBC_2.38 __pthread_kill F GLIBC_2.38 __pthread_self F GLIBC_2.38 __ptsname_r_chk F GLIBC_2.38 __pwrite64 F @@ -1561,6 +1562,7 @@ GLIBC_2.38 pthread_getschedparam F GLIBC_2.38 pthread_getspecific 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_clocklock F GLIBC_2.38 pthread_mutex_consistent F GLIBC_2.38 pthread_mutex_consistent_np F @@ -2324,6 +2326,7 @@ GLIBC_2.42 ullabs F GLIBC_2.43 pthread_cancel F GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getcpuclockid F +GLIBC_2.43 pthread_kill F GLIBC_2.43 pthread_setconcurrency F GLIBC_2.43 pthread_setschedprio F GLIBC_2.43 pthread_yield F diff --git a/sysdeps/mach/hurd/x86_64/libpthread.abilist b/sysdeps/mach/hurd/x86_64/libpthread.abilist index f8d7ee6bfd..f1fef475ad 100644 --- a/sysdeps/mach/hurd/x86_64/libpthread.abilist +++ b/sysdeps/mach/hurd/x86_64/libpthread.abilist @@ -5,7 +5,6 @@ GLIBC_2.38 __errno_location F GLIBC_2.38 __h_errno_location F GLIBC_2.38 __mutex_lock_solid F GLIBC_2.38 __mutex_unlock_solid F -GLIBC_2.38 __pthread_kill F GLIBC_2.38 __pthread_mutex_transfer_np F GLIBC_2.38 __pthread_spin_destroy F GLIBC_2.38 __pthread_spin_init F @@ -45,7 +44,6 @@ GLIBC_2.38 pthread_getattr_np 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_kill F GLIBC_2.38 pthread_mutex_transfer_np F GLIBC_2.38 pthread_spin_destroy F GLIBC_2.38 pthread_spin_init F