src/hotspot/share/utilities/globalCounter.cpp
changeset 59249 29b0d0b61615
parent 59247 56bf71d64d51
child 59290 97d13893ec3c
equal deleted inserted replaced
59248:e92153ed8bdc 59249:29b0d0b61615
    57 };
    57 };
    58 
    58 
    59 void GlobalCounter::write_synchronize() {
    59 void GlobalCounter::write_synchronize() {
    60   assert((*Thread::current()->get_rcu_counter() & COUNTER_ACTIVE) == 0x0, "must be outside a critcal section");
    60   assert((*Thread::current()->get_rcu_counter() & COUNTER_ACTIVE) == 0x0, "must be outside a critcal section");
    61   // Atomic::add must provide fence since we have storeload dependency.
    61   // Atomic::add must provide fence since we have storeload dependency.
    62   uintx gbl_cnt = Atomic::add(COUNTER_INCREMENT, &_global_counter._counter);
    62   uintx gbl_cnt = Atomic::add(&_global_counter._counter, COUNTER_INCREMENT);
    63 
    63 
    64   // Do all RCU threads.
    64   // Do all RCU threads.
    65   CounterThreadCheck ctc(gbl_cnt);
    65   CounterThreadCheck ctc(gbl_cnt);
    66   for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thread = jtiwh.next(); ) {
    66   for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thread = jtiwh.next(); ) {
    67     ctc.do_thread(thread);
    67     ctc.do_thread(thread);