| Message ID | 20241126205329.2215295-1-gfleury@disroot.org (mailing list archive) |
|---|---|
| Headers |
Return-Path: <libc-alpha-bounces~patchwork=sourceware.org@sourceware.org> 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 768543858D37 for <patchwork@sourceware.org>; Tue, 26 Nov 2024 20:55:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 768543858D37 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=disroot.org header.i=@disroot.org header.a=rsa-sha256 header.s=mail header.b=lH269zac X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) by sourceware.org (Postfix) with ESMTPS id 63B703858C50 for <libc-alpha@sourceware.org>; Tue, 26 Nov 2024 20:54:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 63B703858C50 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=disroot.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 63B703858C50 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1732654460; cv=none; b=WkLckTvwjeUChNaXVge2fTJ4zqoJuSGVHAp7k1Nju79eia/+FRPa3b04gyJth1viZHTxcjMqambtFI4JVWlQqTYNQPySEZOY4HNwxmXUh2MMz1j9RubfFep6rISKwQpwqlslnWBwZlho0fDaDjKHHfYM3YlVQOVJmSADQYbu2+I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1732654460; c=relaxed/simple; bh=EW/ULW4Uk+KESlfm8OBIV3HqF9o1nD6GFOEapnPifuk=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=OMGDsUsolj1enB1L6eqqHomK8SkC+HHnDqyaBo6hZB25qw5nLt/T3tGKUIRzCICELw+yPuY7lT2K4+rlICBle7v+n0AO55iRKSHEwS6VRRYiCqMXjXv84UmUtUct+N0cRBrEhg5Ht8f8vAC71bL67ux90C7uSHp20L1anCEVKnY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 63B703858C50 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id D00C724D07; Tue, 26 Nov 2024 21:54:16 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id VLLD9vcoOm5D; Tue, 26 Nov 2024 21:54:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1732654452; bh=EW/ULW4Uk+KESlfm8OBIV3HqF9o1nD6GFOEapnPifuk=; h=From:To:Cc:Subject:Date; b=lH269zac2pTeDAQr4167yr6CErma60zwl9y/NpbRUnL13TwRCfFU2dFAWs2EvwxI/ nxS/IJv7d+kbj8iqQqf/ChXChAcFurcZ1i+1xdkaTrZgMyR4th4iZ5tnbkwHwfe1CR cK6cCwMQTJU+SCFLzgy1zRKQKGLi1+LJPuOv7kTsfADqVRIJppKqoeOVFrwJGYsXiT iMgtcF+HcXEWq07bGridzbxCabYW8Ymrq2JzEWjEmNxCx/RcWvdr6Z9v3lknTbrdE0 45yuGP9XzTI1gvDGmgnG5671KHOq8QPQDWw+D/FkZOiHrUAtqAgMLp8msN/IZ/GA8/ 2lGXqS6CmlzzQ== From: gfleury <gfleury@disroot.org> To: libc-alpha@sourceware.org Cc: gfleury <gfleury@disroot.org> Subject: [PATCH 0/7] htl: move pthread_condattr_* into libc. Date: Tue, 26 Nov 2024 22:53:22 +0200 Message-Id: <20241126205329.2215295-1-gfleury@disroot.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, 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 <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
htl: move pthread_condattr_* into libc.
|
|
Message
gfleury
Nov. 26, 2024, 8:53 p.m. UTC
Hello, I’m working on moving pthread_condattr_* and have a question regarding the pthread_condattr_getclock and pthread_condattr_setclock functions for example For pthread_condattr_getclock, I’m using the following format: versioned_symbol (libpthread, __pthread_condattr_getclock, pthread_condattr_getclock, GLIBC_2_41); However, for pthread_condattr_setclock, I see two different formats: +versioned_symbol (libc, __pthread_condattr_setclock, pthread_condattr_setclock, GLIBC_2_41); and +versioned_symbol (libpthread, __pthread_condattr_setclock, pthread_condattr_setclock, GLIBC_2_41); I have checked the ABI for libc and verified the PLT, and both formats pass those checks. Which approach is correct, and what are the reasons for choosing one over the other? Note: I haven't had time to work on pthread_setcancestate again. gfleury (7): htl: move pthread_condattr_destroy into libc. htl: move __pthread_default_condattr into libc. htl: move pthread_condattr_getclock into libc. htl: move pthread_condattr_getpshared into libc. htl: move pthread_condattr_init into libc. htl: move pthread_condattr_setclock into libc. htl: move pthread_condattr_setpshared into libc. htl/Makefile | 14 +++++++------- htl/Versions | 16 ++++++++++++---- htl/forward.c | 4 ---- htl/pt-initialize.c | 2 -- htl/pt-internal.h | 1 + sysdeps/htl/pt-cond.c | 1 + sysdeps/htl/pt-condattr-destroy.c | 6 +++++- sysdeps/htl/pt-condattr-getclock.c | 9 +++++++-- sysdeps/htl/pt-condattr-getpshared.c | 8 +++++++- sysdeps/htl/pt-condattr-init.c | 7 ++++++- sysdeps/htl/pt-condattr-setclock.c | 10 ++++++++-- sysdeps/htl/pt-condattr-setpshared.c | 8 +++++++- sysdeps/htl/pthread-functions.h | 4 ---- sysdeps/htl/pthreadP.h | 2 ++ sysdeps/mach/hurd/i386/libc.abilist | 10 ++++++++++ sysdeps/mach/hurd/i386/libpthread.abilist | 6 ------ sysdeps/mach/hurd/x86_64/libc.abilist | 8 ++++++++ sysdeps/mach/hurd/x86_64/libpthread.abilist | 6 ------ 18 files changed, 81 insertions(+), 41 deletions(-)
Comments
> I’m working on moving pthread_condattr_* and have a question regarding the pthread_condattr_getclock and pthread_condattr_setclock functions for example > > For pthread_condattr_getclock, I’m using the following format: > > versioned_symbol (libpthread, __pthread_condattr_getclock, pthread_condattr_getclock, GLIBC_2_41); > However, for pthread_condattr_setclock, I see two different formats: > > +versioned_symbol (libc, __pthread_condattr_setclock, pthread_condattr_setclock, GLIBC_2_41); > and > > +versioned_symbol (libpthread, __pthread_condattr_setclock, pthread_condattr_setclock, GLIBC_2_41); > I have checked the ABI for libc and verified the PLT, and both formats pass those checks. > > Which approach is correct, and what are the reasons for choosing one > over the other? Some ports have different ABI baselines for libc and libpthread. For example, GLIBC_2.0 may have existed in libpthread (prior to the move), but not in libc because it started at GLIBC_2.2. So if you write versioned_symbol (libpthread, __some_function, some_function, GLIBC_2_0) it would turn into some_function@@GLIBC_2.0, but for versioned_symbol (libc, __some_function, some_function, GLIBC_2_0) you would get some_function@@GLIBC_2.2 instead. In your case, that difference does not matter because you are using it with a much later version, so the baseline adjustment does not happen. (I haven't checked if i386-gnu is one of the ports with differing baselines.) I would stick to libc for consistency, but we have some (harmless) libpthread uses after the NPTL conversion. Thanks, Florian
Applied, thanks! gfleury, le mar. 26 nov. 2024 22:53:22 +0200, a ecrit: > Hello, > > I’m working on moving pthread_condattr_* and have a question regarding the pthread_condattr_getclock and pthread_condattr_setclock functions for example > > For pthread_condattr_getclock, I’m using the following format: > > versioned_symbol (libpthread, __pthread_condattr_getclock, pthread_condattr_getclock, GLIBC_2_41); > However, for pthread_condattr_setclock, I see two different formats: > > +versioned_symbol (libc, __pthread_condattr_setclock, pthread_condattr_setclock, GLIBC_2_41); > and > > +versioned_symbol (libpthread, __pthread_condattr_setclock, pthread_condattr_setclock, GLIBC_2_41); > I have checked the ABI for libc and verified the PLT, and both formats pass those checks. > > Which approach is correct, and what are the reasons for choosing one over the other? > > Note: I haven't had time to work on pthread_setcancestate again. > > gfleury (7): > htl: move pthread_condattr_destroy into libc. > htl: move __pthread_default_condattr into libc. > htl: move pthread_condattr_getclock into libc. > htl: move pthread_condattr_getpshared into libc. > htl: move pthread_condattr_init into libc. > htl: move pthread_condattr_setclock into libc. > htl: move pthread_condattr_setpshared into libc. > > htl/Makefile | 14 +++++++------- > htl/Versions | 16 ++++++++++++---- > htl/forward.c | 4 ---- > htl/pt-initialize.c | 2 -- > htl/pt-internal.h | 1 + > sysdeps/htl/pt-cond.c | 1 + > sysdeps/htl/pt-condattr-destroy.c | 6 +++++- > sysdeps/htl/pt-condattr-getclock.c | 9 +++++++-- > sysdeps/htl/pt-condattr-getpshared.c | 8 +++++++- > sysdeps/htl/pt-condattr-init.c | 7 ++++++- > sysdeps/htl/pt-condattr-setclock.c | 10 ++++++++-- > sysdeps/htl/pt-condattr-setpshared.c | 8 +++++++- > sysdeps/htl/pthread-functions.h | 4 ---- > sysdeps/htl/pthreadP.h | 2 ++ > sysdeps/mach/hurd/i386/libc.abilist | 10 ++++++++++ > sysdeps/mach/hurd/i386/libpthread.abilist | 6 ------ > sysdeps/mach/hurd/x86_64/libc.abilist | 8 ++++++++ > sysdeps/mach/hurd/x86_64/libpthread.abilist | 6 ------ > 18 files changed, 81 insertions(+), 41 deletions(-) > > -- > 2.39.5 >