[cpp-threads] modes, pass 2
    Alexander Terekhov 
    alexander.terekhov at gmail.com
       
    Wed May 11 16:05:53 BST 2005
    
    
  
On 5/11/05, Doug Lea <dl at cs.oswego.edu> wrote:
[...]
> 3. I still think isync works as LoadLoad barrier.
> 
> >   . consumer spins on the flag until it is reset
> >>   . consumer executes an "isync" to discard any subsequent speculative
> >> memory reads
> >>   . consumer reads the data
> 
> Please tell me which of these things I got wrong :-)
1 and 2 aside for a moment, 3 is surely wrong. AFAICS.
"consumer spins on the flag until it is reset" implies load-CRO->
branch thing. Placing isync after that loop has the effect of 
load.acq for flag load in Itanic speak. Without that control 
dependency (note that it orders subsequent stores on its own even 
without isync), isync doesn't order anything at all since it 
doesn't prevent sinking (apart from op governing branching 
preceding isync): <quote source=BOOK2> The isync instruction may 
complete before storage accesses associated with instructions 
preceding the isync instruction have been performed."
Now please tell me what I got wrong. ;-)
regards,
alexander.
    
    
More information about the cpp-threads
mailing list