equal
deleted
inserted
replaced
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); |