PowerPC: libc single-thread lock optimization
Roland McGrath
roland@hack.frob.com
Mon Apr 28 21:49:00 GMT 2014
Heretofore sysdeps/CPU/bits/atomic.h is for pure CPU-based implementations.
In a few cases there exists a sysdeps/unix/sysv/linux/CPU/bits/atomic.h as
well because it needs to use kernel support.
This is something somewhere in between: you are not depending directly on
specific facilities outside the pure CPU facilities; but you are depending
on library infrastructure and associated assumptions that do not hold in
the general case of using the atomic macros in arbitrary contexts.
Furthermore, you are defining SINGLE_THREAD_P to depend on NPTL
implementation details. IMHO neither of these things belong in a
sysdeps/CPU/bits/atomic.h file.
The lowlevellock.h change doesn't have those issues, so I'd suggest you
send that separately and it should go in easily.
Thanks,
Roland
More information about the Libc-alpha
mailing list