This is the mail archive of the
mailing list for the glibc project.
Re: PowerPC: libc single-thread lock optimization
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 28 Apr 2014 14:49:38 -0700 (PDT)
- Subject: Re: PowerPC: libc single-thread lock optimization
- Authentication-results: sourceware.org; auth=none
- References: <5343F8F1 dot 4000400 at linux dot vnet dot ibm dot com> <535ECADE dot 2050004 at linux dot vnet dot ibm dot com>
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
The lowlevellock.h change doesn't have those issues, so I'd suggest you
send that separately and it should go in easily.