public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Samuel Thibault <samuel.thibault@gnu.org>
Cc: Thomas Schwinge <thomas@codesourcery.com>,
	Florian Weimer <fweimer@redhat.com>,
	GNU C Library <libc-alpha@sourceware.org>, <bug-hurd@gnu.org>,
	David Michael <fedora.dm0@gmail.com>
Subject: Re: Upstreaming the glibc Hurd port
Date: Thu, 25 Jan 2018 16:12:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.20.1801251544550.22734@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20180125014143.2hxhzon5lzxtqq6j@var.youpi.perso.aquilenet.fr>

Regarding the libpthread / htl code, and getting it ready for inclusion in 
glibc master:

Obviously my general coding style comments at 
<https://sourceware.org/ml/libc-alpha/2018-01/msg00646.html> apply equally 
to this code.  Apart from that:

* Remove htl/ChangeLog.  We don't have subdirectory ChangeLogs now.  
Everything goes in the top-level ChangeLog, with older ChangeLogs (that 
have actual ChangeLog content) being in the ChangeLog.old/ directory.  
When importing files / patches previously maintained elsewhere, I *do* 
think the ChangeLog header for those patches should name all authors who 
contributed to them (which may make for a long header with lots of authors 
listed).  (If the GNU Coding Standards change to stop requiring ChangeLog 
format and we decide to stop using it, we'll still need some convention 
for how to credit multi-author patches.)

* Remove htl/tests/.cvsignore.

* Support for building htl outside the glibc source tree (or with older 
glibc versions) should not be included.

* Files in htl/sysdeps should be moved into appropriate locations in the 
main sysdeps tree, just as was done with nptl/sysdeps when nptl ceased to 
be an add-on.

* You seem to have some custom system for building tests in htl/tests.  
Tests should be built and run using the normal glibc testsuite machinery 
(and should use <support/test-driver.c>).

* You have four installed non-bits/ API headers: pthread.h 
pthread/pthread.h pthread/pthreadtypes.h semaphore.h.  NPTL has just 
pthread.h and semaphore.h.  Do you really need pthread/pthread.h and 
pthread/pthreadtypes.h as installed public API headers?  I'd expect the 
same two API headers as NPTL has.

* The bits/ convention is for headers that are (a) installed, (b) only for 
use by other installed headers, not for direct inclusion by users (and 
sometimes have #error conditionals to guard against direct inclusion).  
Within that convention, there's a newer bits/types/ convention for headers 
defining a single type, which is intended as a replacement for the older 
__need_* convention.  Now, this brings up three points regarding the htl 
code (and possibly other pieces in the Hurd port).

(i) You still have some headers that define or use __need_*; those should 
be changed to use bits/types/ headers (__need_* has generally been 
eliminated from glibc, except where it's defined before including *GCC* 
headers, not glibc ones).

(ii) Some of the bits/ headers in htl look like they are just defining a 
single type, so should actually be bits/types/ headers named according to 
the new convention.

(iii) bits/memory.h and bits/pt-atomic.h don't appear to be installed 
headers, meaning they should not have bits/ names.  Actually, uses of 
those headers should probably be changed to use glibc's existing atomic.h 
interfaces, and those htl-specific headers removed - if for some reason 
the existing atomic.h interfaces are insufficient, maybe those interfaces 
need to be extended.


The following would be desirable cleanups, but maybe for after the code is 
in master:

* I'd expect that NPTL tests (and likewise HTL tests) are largely tests of 
POSIX (or GNU extension) threading functionality, not of features specific 
to one threading implementation.  Thus, they should as far as possible be 
shared between the different threading implementations.  I don't know the 
best directory arrangements for achieving that.

* Hopefully C11 threads support will be added for 2.28 (didn't get 
reviewed in time for 2.27).  The existing patches put it in the nptl/ 
directory, but again, to the extent that it actually builds on generic 
pthreads functionality, the code and its tests should be shared as much as 
possible between NPTL and HTL.

* Likewise for the pthread.h and semaphore.h API headers - only parts 
genuinely specific to a given implementation should be split out into 
implementation-specific bits/ headers.  (Indeed, the NPTL semaphore.h is 
already in sysdeps/pthread/ not an NPTL-specific directory - do you really 
need a different one for HTL?)

-- 
Joseph S. Myers
joseph@codesourcery.com

  parent reply	other threads:[~2018-01-25 16:12 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18 12:39 Florian Weimer
2018-01-18 12:45 ` Samuel Thibault
2018-01-18 12:58   ` Florian Weimer
2018-01-18 13:47   ` Joseph Myers
2018-01-18 13:52     ` Joseph Myers
2018-01-18 13:59       ` Samuel Thibault
2018-01-18 13:58     ` Samuel Thibault
2018-01-18 14:03       ` Joseph Myers
2018-01-28 18:40         ` Samuel Thibault
2018-01-18 14:22       ` Thomas Schwinge
2018-01-18 14:27         ` Samuel Thibault
2018-01-18 15:14         ` Samuel Thibault
2018-01-18 15:35           ` Joseph Myers
2018-01-18 15:42             ` Samuel Thibault
2018-01-18 16:48               ` Joseph Myers
2018-01-18 16:59                 ` Samuel Thibault
2018-01-18 23:16                   ` Joseph Myers
2018-01-18 23:59                     ` Samuel Thibault
2018-01-19  0:34                       ` Joseph Myers
2018-01-19 10:10                         ` Thomas Schwinge
2018-01-19 12:35                           ` Manolis Ragkousis
2018-01-19 13:08                           ` Joseph Myers
2018-01-19 14:11                             ` Thomas Schwinge
2018-01-19 15:12                               ` Joseph Myers
2018-01-19 18:24                                 ` Zack Weinberg
2018-01-19 18:30                                   ` Joseph Myers
2018-01-19 17:23                           ` Joseph Myers
2018-01-19 17:32                             ` Samuel Thibault
2018-01-19 17:50                               ` Joseph Myers
2018-01-19 17:59                                 ` Samuel Thibault
2018-01-24  1:10                             ` Samuel Thibault
2018-01-24  1:26                               ` Joseph Myers
2018-01-24  1:27                               ` Samuel Thibault
2018-01-25  1:41                                 ` Samuel Thibault
2018-01-25 15:43                                   ` Joseph Myers
2018-01-25 16:12                                   ` Joseph Myers [this message]
2018-01-25 16:20                                     ` Samuel Thibault
2018-03-19  1:51                                     ` Samuel Thibault
2018-03-19 15:36                                       ` Zack Weinberg
2018-03-19 15:47                                         ` Samuel Thibault
2018-03-19 15:54                                           ` Zack Weinberg
2018-03-19 16:05                                             ` Samuel Thibault
2018-03-26 23:13                                       ` Rafal Luzynski
2018-03-27  7:45                                         ` Samuel Thibault
2018-03-27  9:01                                         ` Samuel Thibault
2018-03-27 10:40                                           ` Rafal Luzynski
2018-03-27 10:43                                             ` Samuel Thibault
2018-03-27 10:53                                               ` Rafal Luzynski
2018-03-27 14:46                                           ` Tulio Magno Quites Machado Filho
2018-03-27 14:53                                             ` Carlos O'Donell
2018-03-27 16:31                                             ` Samuel Thibault
2018-04-02  0:10                                       ` Samuel Thibault
2018-04-02  7:51                                         ` Florian Weimer
2018-04-02  8:24                                           ` Samuel Thibault
2018-04-02 14:17                                         ` Joseph Myers
2018-04-02 15:50                                           ` Samuel Thibault
2018-04-02 16:13                                             ` Samuel Thibault
2018-04-03  0:13                                               ` Joseph Myers
2018-04-17 22:50                                                 ` Samuel Thibault
2018-04-17 23:02                                                   ` Joseph Myers
2018-04-17 23:08                                                     ` Samuel Thibault
2018-04-18 11:13                                                       ` Joseph Myers
2018-04-18 13:54                                                         ` Zack Weinberg
2018-04-18 14:03                                                           ` Samuel Thibault
2018-04-18 18:40                                                             ` Zack Weinberg
2018-04-18 18:53                                                               ` Samuel Thibault
2018-04-03  0:10                                             ` Joseph Myers
2018-04-18 23:57                                               ` Samuel Thibault
2018-04-21  8:54                                                 ` Samuel Thibault
2018-04-02 14:22                                         ` Joseph Myers
2018-04-02 14:47                                           ` Samuel Thibault
2018-04-02 16:01                                             ` H.J. Lu
2018-04-02 16:16                                               ` Samuel Thibault
2018-04-02 17:06                                                 ` H.J. Lu
2018-04-02 17:16                                                   ` Samuel Thibault
2018-04-02 17:22                                                     ` H.J. Lu
2018-04-02 17:35                                                       ` Samuel Thibault
2018-04-02 17:37                                                         ` Samuel Thibault
2018-04-03 15:45                                         ` Joseph Myers
2018-04-03 16:08                                           ` Samuel Thibault
2018-04-03 21:48                                           ` Joseph Myers
2018-04-03 21:58                                             ` Samuel Thibault
2018-04-03 22:07                                               ` Zack Weinberg
2018-04-03 22:48                                                 ` Joseph Myers
2018-04-05 11:07                                               ` Florian Weimer
2018-01-18 14:33     ` Samuel Thibault
2018-01-18 15:24       ` Joseph Myers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1801251544550.22734@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=bug-hurd@gnu.org \
    --cc=fedora.dm0@gmail.com \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=samuel.thibault@gnu.org \
    --cc=thomas@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).