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