This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: sync operations: where's the barrier?
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Geoffrey Keating <geoffk at apple dot com>
- Cc: Richard Henderson <rth at redhat dot com>, GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Mon, 18 Apr 2005 21:13:41 -0400
- Subject: Re: sync operations: where's the barrier?
- References: <fada5337d9b473e4a771b7fd9d748053@apple.com>
>>>>> Geoffrey Keating writes:
Geoff> The documentation for the atomic operation patterns says things like:
>> This pattern must issue any memory barrier instructions such that the
>> pattern as a whole acts as a full barrier.
Geoff> Should the barrier happen before the operation, after the operation,
Geoff> are there two barriers, or is it undefined?
On PowerPC, this has a lot to do with the cooperation of the
various functions referencing the memory atomically. I am most familiar
with emitting sync (or lwsync) before the atomic operation.
David