|
Boost : |
From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2006-12-01 12:13:31
Peter Dimov wrote:
> #LoadLoad means that loads
> that precede the barrier cannot be reordered with loads that follow the
> barrier.
I.e. a instruction sequence
load(A)
#LoadLoad
load(B)
cannot be executed by the processor
as
load(B)
load(A)
but nothing prevents the processor from executing the sequence
load(A)
#LoadLoad
store(B)
as
store(B)
load(A)
right?
Then
load(A)
load(B)
#LoadLoad | #LoadStore
store(C)
cannot be reordered as
load(B)
store(C)
load(A)
Yes?
But in the acquire/release world
load(A)
load(B).acquire
store(C)
can be reordered as
load(B)
store(C)
load(A)
or I am wrong in this assumption?
If I am not wrong, In which respect is your example then an emulation of
acquire semantics. If I a wrong, what I am missing?
> The four basic primitives can be combined freely, so for example
> #LoadLoad | #LoadStore means that preceding loads cannot be reordered with
> subsequent loads or stores.
I see, thank you.
Roland
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk