|
Boost : |
From: Anthony Williams (anthony_w.geo_at_[hidden])
Date: 2007-10-08 09:28:16
"Hartmut Kaiser" <hartmut.kaiser_at_[hidden]> writes:
>> > _ReadWriteBarrier stops the compiler from reordering. Going to a
>> > non-intrinsic InterlockedCompareExchange will also have
>> this effect,
>> > but it might be possible to achieve it in another (cheaper)
>> > compiler-specific way; __asm__ ( :::"memory" ) is the GCC
>> equivalent.
>> > Borland may already not reorder across a volatile read;
>> this needs to be tested.
>>
>> Totally agreed. The easiest change to make mingw and Borland
>> non-broken was to use ICE, but it is definitely overkill if
>> there's a cheaper way.
>>
>> All that's need here is a compiler barrier; I couldn't find
>> an equivalent in the Borland docs this morning, but that
>> doesn't mean there isn't one. Does __asm__ ( :::"memory" )
>> work on mingw? If so, I'll use that rather than ICE for mingw.
>
> FWIW, Intel V10 on Windows seems not to implement _ReadWriteBarrier neither
> (at least we get linker errors there as well).
Yes, I spotted that. Hopefully this morning's fix will help there too. Does
Intel v10 have an equivalent to _ReadWriteBarrier?
Anthony
-- Anthony Williams Just Software Solutions Ltd - http://www.justsoftwaresolutions.co.uk Registered in England, Company Number 5478976. Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk