Boost logo

Boost :

From: Anthony Williams (anthony.ajw_at_[hidden])
Date: 2008-08-22 02:55:16

"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 Williams            | Just Software Solutions Ltd
Custom Software Development |
Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL

Boost list run by bdawes at, gregod at, cpdaniel at, john at