< prev index next >

src/hotspot/share/utilities/singleWriterSynchronizer.cpp

Print this page

        

*** 62,72 **** // operations until this change of _enter succeeds. uint old; do { old = value; *new_ptr = ++value; ! value = Atomic::cmpxchg(value, &_enter, old); } while (old != value); // Critical sections entered before we changed the polarity will use // the old exit counter. Critical sections entered after the change // will use the new exit counter. volatile uint* old_ptr = &_exit[old & 1]; --- 62,72 ---- // operations until this change of _enter succeeds. uint old; do { old = value; *new_ptr = ++value; ! value = Atomic::cmpxchg(&_enter, old, value); } while (old != value); // Critical sections entered before we changed the polarity will use // the old exit counter. Critical sections entered after the change // will use the new exit counter. volatile uint* old_ptr = &_exit[old & 1];
< prev index next >