Chengrong, atomic instruction (such as locked cmpxchg) itself has
barrier effect built-in; otherwise, it's hard to be atomic.

Thanks,
xiaofeng

On Dec 14, 2007 3:57 PM, 史成荣 <[EMAIL PROTECTED]> wrote:
>     As we know, the key word of "synchronized" in Java will translated into
> monenter/monexit pair. And synchronization shoud contain two functions, One
> is the mutex lock and the other is the *memory barrier*. I traced the
> compiling pipeline from Java bytecode to LIR, found the  monenter/monexit
> pair is finally transformed into some assembly codes among
> which there are codes to call the interface function provided by Thread
> Manager. But I didn't find any function provided by Thread Manager
> implementing the *memory barrier.* It seams that only the mutex lock is
> implemented.
>     I don't know if I am right. Can anyone give some suggestions?
>
> Thanks,
> Chengrong
>



-- 
http://xiao-feng.blogspot.com

Reply via email to