This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] [BZ#2505] PPC32 should use lwsync where possible
- From: Steve Munroe <sjmunroe at us dot ibm dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: decimal at us dot ibm dot com, libc-alpha at sources dot redhat dot com, munroesj at us dot ibm dot com
- Date: Tue, 4 Apr 2006 08:46:13 -0500
- Subject: Re: [PATCH] [BZ#2505] PPC32 should use lwsync where possible
Segher Boessenkool <email@example.com> wrote on 04/03/2006
> Hi Steven,
> I would love to review this, but I'm afraid I have no idea
> what any of these macros are supposed to do. Could you please
> explain, preferably in code comments, or just point me to the
> documentation (that I searched for, but could not find)? Thanks.
These are internal macros to the glibc's implementation of atomic ops and
low level lock primitives for NPTL. There is no documentation as such.
There may be some clues in Ulrich Drepper's white papers "Native Posix
Thread Library Design" <http://people.redhat.com/drepper/nptl-design.pdf>,
and "Futexes are Tricky" http://people.redhat.com/drepper/futex.pdf
These macros are used consistently across the arches because they are
written from Uli's example i386 implementation. They are used primarily
with the atomic operation macros defined within the same header. They
define memory read/write/full barriers for atomic ops and acquire/release
barriers for lock primatives.
Steven J. Munroe
Linux on Power Toolchain Architect
IBM Corporation, Linux Technology Center