This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] s390: support for __sync_lock_test_and_set


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]