Message ID | 20210324002015.338244-1-samuel.thibault@ens-lyon.org |
---|---|
State | Committed, archived |
Headers |
Return-Path: <libc-alpha-bounces@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 44FA038618D4; Wed, 24 Mar 2021 00:20:21 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from hera.aquilenet.fr (hera.aquilenet.fr [IPv6:2a0c:e300::1]) by sourceware.org (Postfix) with ESMTPS id 75F873857829 for <libc-alpha@sourceware.org>; Wed, 24 Mar 2021 00:20:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 75F873857829 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=samuel.thibault@ens-lyon.org Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 7E4B8662; Wed, 24 Mar 2021 01:20:17 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IKGd4i0Zk68H; Wed, 24 Mar 2021 01:20:16 +0100 (CET) Received: from begin (unknown [IPv6:2a01:cb19:956:1b00:de41:a9ff:fe47:ec49]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 951FAA6; Wed, 24 Mar 2021 01:20:16 +0100 (CET) Received: from samy by begin with local (Exim 4.94) (envelope-from <samuel.thibault@ens-lyon.org>) id 1lOrFv-001Q0J-R6; Wed, 24 Mar 2021 01:20:15 +0100 From: Samuel Thibault <samuel.thibault@ens-lyon.org> To: libc-alpha@sourceware.org Subject: [hurd,commited] htl: Add missing fork.h Date: Wed, 24 Mar 2021 01:20:15 +0100 Message-Id: <20210324002015.338244-1-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: +++++ X-Rspamd-Server: hera Authentication-Results: hera.aquilenet.fr X-Rspamd-Queue-Id: 7E4B8662 X-Spamd-Result: default: False [5.00 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_MISSING_CHARSET(2.50)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; MID_CONTAINS_FROM(1.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[] X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 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> Cc: commit-hurd@gnu.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
[hurd,commited] htl: Add missing fork.h
|
|
Commit Message
Samuel Thibault
March 24, 2021, 12:20 a.m. UTC
2b47727c68b6 ("posix: Consolidate register-atfork") introduced a fork.h header to declare the atfork unregister hook, but was missing adding it for htl. This fixes tst-atfork2. --- sysdeps/htl/fork.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 sysdeps/htl/fork.h
Comments
On 23/03/2021 21:20, Samuel Thibault wrote: > 2b47727c68b6 ("posix: Consolidate register-atfork") introduced a fork.h > header to declare the atfork unregister hook, but was missing adding it > for htl. > > This fixes tst-atfork2. Both lowlevellock.h and register-atfork.h are common headers, I think it would be better to just add them to generic fork.h header. > --- > sysdeps/htl/fork.h | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > create mode 100644 sysdeps/htl/fork.h > > diff --git a/sysdeps/htl/fork.h b/sysdeps/htl/fork.h > new file mode 100644 > index 0000000000..9d0d1d2b41 > --- /dev/null > +++ b/sysdeps/htl/fork.h > @@ -0,0 +1,20 @@ > +/* Copyright (C) 2002-2021 Free Software Foundation, Inc. > + This file is part of the GNU C Library. > + Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library; if not, see > + <https://www.gnu.org/licenses/>. */ > + > +#include <lowlevellock.h> > +#include <register-atfork.h> >
Adhemerval Zanella, le mer. 24 mars 2021 09:29:44 -0300, a ecrit: > On 23/03/2021 21:20, Samuel Thibault wrote: > > 2b47727c68b6 ("posix: Consolidate register-atfork") introduced a fork.h > > header to declare the atfork unregister hook, but was missing adding it > > for htl. > > > > This fixes tst-atfork2. > > Both lowlevellock.h and register-atfork.h are common headers, > I think it would be better to just add them to generic fork.h header. Ok but perhaps there was a reason why you didn't do it in your commit? Samuel
On 24/03/2021 09:31, Samuel Thibault wrote: > Adhemerval Zanella, le mer. 24 mars 2021 09:29:44 -0300, a ecrit: >> On 23/03/2021 21:20, Samuel Thibault wrote: >>> 2b47727c68b6 ("posix: Consolidate register-atfork") introduced a fork.h >>> header to declare the atfork unregister hook, but was missing adding it >>> for htl. >>> >>> This fixes tst-atfork2. >> >> Both lowlevellock.h and register-atfork.h are common headers, >> I think it would be better to just add them to generic fork.h header. > > Ok but perhaps there was a reason why you didn't do it in your commit? I haven't touched the generic fork.h because I haven't see build issues on i686-gnu. Why exactly tst-atfork2 fails without this includes?
Adhemerval Zanella, le mer. 24 mars 2021 09:40:36 -0300, a ecrit:
> Why exactly tst-atfork2 fails without this includes?
It misses the atfork unregister hook called at module unload.
Samuel
On 24/03/2021 09:45, Samuel Thibault wrote: > Adhemerval Zanella, le mer. 24 mars 2021 09:40:36 -0300, a ecrit: >> Why exactly tst-atfork2 fails without this includes? > > It misses the atfork unregister hook called at module unload. Ok, but *why* exactly? The sysdeps/htl/pt-atfork.c already includes register-atfork.h after the fork.h inclusion. What the missing includes misses to define on hurd implementation?
Adhemerval Zanella, le mer. 24 mars 2021 09:56:47 -0300, a ecrit: > On 24/03/2021 09:45, Samuel Thibault wrote: > > Adhemerval Zanella, le mer. 24 mars 2021 09:40:36 -0300, a ecrit: > > > Why exactly tst-atfork2 fails without this includes? > > > > It misses the atfork unregister hook called at module unload. > > Ok, but *why* exactly? The sysdeps/htl/pt-atfork.c already > includes register-atfork.h after the fork.h inclusion. It's not pt-atfork.c which needs UNREGISTER_ATFORK, but stdlib/cxa_finalize, which gets it from fork.h Samuel
On 24/03/2021 10:00, Samuel Thibault wrote: > Adhemerval Zanella, le mer. 24 mars 2021 09:56:47 -0300, a ecrit: >> On 24/03/2021 09:45, Samuel Thibault wrote: >>> Adhemerval Zanella, le mer. 24 mars 2021 09:40:36 -0300, a ecrit: >>>> Why exactly tst-atfork2 fails without this includes? >>> >>> It misses the atfork unregister hook called at module unload. >> >> Ok, but *why* exactly? The sysdeps/htl/pt-atfork.c already >> includes register-atfork.h after the fork.h inclusion. > > It's not pt-atfork.c which needs UNREGISTER_ATFORK, but > stdlib/cxa_finalize, which gets it from fork.h Thanks, this is a good indication that is better to just remove the ifdef UNREGISTER_ATFORK from cxa_finalize (since now it is defined on generic implementation).
On 24/03/2021 10:04, Adhemerval Zanella wrote: > > > On 24/03/2021 10:00, Samuel Thibault wrote: >> Adhemerval Zanella, le mer. 24 mars 2021 09:56:47 -0300, a ecrit: >>> On 24/03/2021 09:45, Samuel Thibault wrote: >>>> Adhemerval Zanella, le mer. 24 mars 2021 09:40:36 -0300, a ecrit: >>>>> Why exactly tst-atfork2 fails without this includes? >>>> >>>> It misses the atfork unregister hook called at module unload. >>> >>> Ok, but *why* exactly? The sysdeps/htl/pt-atfork.c already >>> includes register-atfork.h after the fork.h inclusion. >> >> It's not pt-atfork.c which needs UNREGISTER_ATFORK, but >> stdlib/cxa_finalize, which gets it from fork.h > > Thanks, this is a good indication that is better to just remove > the ifdef UNREGISTER_ATFORK from cxa_finalize (since now it is > defined on generic implementation). And I think the fork.h header is not really required here, it is being used solely to define the NPTL specific __fork_generation, which Florian recent patch moves to libc.so. So I think we can move this declaration to another internal header and remove fork.h.
diff --git a/sysdeps/htl/fork.h b/sysdeps/htl/fork.h new file mode 100644 index 0000000000..9d0d1d2b41 --- /dev/null +++ b/sysdeps/htl/fork.h @@ -0,0 +1,20 @@ +/* Copyright (C) 2002-2021 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#include <lowlevellock.h> +#include <register-atfork.h>