Boost logo

Boost :

From: Simon Thornington (simon.thornington_at_[hidden])
Date: 2008-08-22 02:57:56


Ok, thanks. Is it fair to say that these MSVC macros are assuming x86
architecture? Would this code still be safe on IA? (I don't personally
have to deal with Itanium, I'm just curious now).

Simon.

On Thu, Aug 21, 2008 at 11:55 PM, Anthony Williams <anthony.ajw_at_[hidden]>wrote:

> "Simon Thornington" <simon.thornington_at_[hidden]> writes:
>
> > thread\win32\interlocked_read.hpp bothers me because I don't believe x86
> > guarantees ordering of loads mixed with stores, but
> interlocked_read_acquire
> > to my reading implies no upward migration of loads (hardware reordering).
> I
> > don't believe _ReadWriteBarrier() helps at all in this case.
>
> On x86, an aligned integer load (MOV instruction) is an acquire
> operation. The _ReadWriteBarrier is needed to stop the compiler
> reordering the instruction.
>
> Anthony
> --
> Anthony Williams | Just Software Solutions Ltd
> Custom Software Development | http://www.justsoftwaresolutions.co.uk
> Registered in England, Company Number 5478976.
> Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk