This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

make nptl no longer an add-on?


In starting to look at nptl code for non-Linux configurations, I'm tending
toward the conclusion that things would be simpler all around if we
migrated nptl to no longer be an add-on.  This doesn't mean that using the
nptl/ code would become mandatory for all configurations, just that it
would become implicit (and impossible to disable) for all configurations
where it's supported at all.  

In practice today nobody ever builds the Linux configurations without nptl.
Doing so requires --disable-sanity-checks, and produces a library that has
an ABI incompatible with production builds.  So I don't think we'd be
foreclosing any opportunities that anyone actually wants to take advantage
of.  It's quite likely that there is already bit-rot in trying to build or
use any Linux configuration without nptl.  Does anybody see a problem with
the idea of making nptl unavoidable on Linux configurations?

I'm sure I'll discover other issues along the way.  But here's what I think
off hand would be the steps to make this happen.

1. Move sysdeps/unix/sysv/linux/CPU/nptl/* -> sysdeps/unix/sysv/linux/CPU/*
   This should not make any difference to what gets built.  I don't think
   there are any existing files that would be displaced, but I haven't
   checked yet.  (Of course Makefile is an exception, but those would get
   merged straightforwardly so no actual content is displaced.)
2. Move sysdeps/CPU/nptl/* -> sysdeps/CPU/*
   Same story.
3. Move nptl/sysdeps/unix/sysv/linux/CPU/* -> sysdeps/unix/sysv/linux/CPU/*
   Should be the same as #1 for a disjoint set of CPUs.
4. Move nptl/sysdeps/CPU/* -> sysdeps/CPU/*
   Should be the same as #2 for a disjoint set of CPUs.
5. Move remaining nptl/sysdeps/... -> sysdeps/...  
   Here there is probably some more variation in how things should be moved
   around.  I'll have to figure it out as I go.
6. Move nptl/Makeconfig -> sysdeps/someplace
   Since the stuff in there is specific to nptl/ code and (mostly) not just
   to "having any pthreads", probably we should add a sysdeps/nptl/ for this.
7. Move some nptl/*.h -> sysdeps/someplace
   Probably sysdeps/nptl/ is the right place for these too.
   But perhaps some should stay in nptl/ and get include/ wrappers.
   Ones that are the generics for sysdeps/ files can move to sysdeps/generic/.
   I'll play it by ear (there are only a few of these files).
8. Various configury loose ends.

At least #1-#5 can be done piecemeal without really perturbing much of
anything.  Things might get more chaotic after that, but I think I can do
it all incrementally in relatively small pieces without breaking the build
in between.  It's likely that some of the pure-file-moving aspects of what
I just posted about under "nptl refactoring" will be interleaved with this.

Does that all sound OK to people?


Thanks,
Roland


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]