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]

installing the <atomic.h> header?


Glibc uses <atomic.h> (with <bits/atomic.h>) internally but does not
install it.  The header would seem to be a great way to provide convenience
wrappers to atomic functionality.  On our platforms (TILEPro, TILE-Gx) the
atomic operations are a mix of builtins, compare-exchange loops, and fast
kernel calls that no user would want to have to re-invent just to get
access to proper atomic instructions.  There used to be folks who used
<asm/atomic.h> from userspace for this kind of thing, but of course that no
longer works, as the kernel no longer exports that header.

If the intent of the glibc maintainers is to not provide this as an
installed header, we'll look at other approaches -- either just doing a
post-install copy of <atomic.h> and <bits/atomic.h> so our cutomers can
have access to the functionality, or perhaps installing the header
somewhere different to avoid confusion as to whether we're using the glibc
internal header or not, e.g. <arch/atomic.h>.  On the other hand, if
installing the header seems plausible, I'm happy to submit a patch to make
it so.  An intermediate position would be to allow this decision to be made
per-architecture, in which case again I'm happy to submit a patch as part
of the tile architecture support for libc-ports.

Guidance would be appreciated.  Thanks!

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com


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