This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] s390: support for __sync_lock_test_and_set
- From: Richard Henderson <rth at redhat dot com>
- To: Adrian Straetling <straetling at de dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, "Weigand, Ulrich" <uweigand at de dot ibm dot com>
- Date: Sat, 1 Oct 2005 20:41:41 -0700
- Subject: Re: [patch] s390: support for __sync_lock_test_and_set
- References: <20050930130511.GA4305@de.ibm.com>
On Fri, Sep 30, 2005 at 03:05:11PM +0200, Adrian Straetling wrote:
> However, the test_and_set instruction on s390(x) stores 0xff into the
> memory location, which should be ok since the documentation states that
> 'the true contents of the memory are implementation defined'.
But I would strongly suggest that targets that *can* store a
particular value do so. And s390 can, via compare-and-swap.
I'd really intended this caveat only be used for weak targets
that really have no other atomic instructions...
r~