< prev index next >

src/hotspot/share/utilities/globalCounter.cpp

Print this page

        

*** 39,49 **** CounterThreadCheck(uintx gbl_cnt) : _gbl_cnt(gbl_cnt) {} void do_thread(Thread* thread) { SpinYield yield; // Loops on this thread until it has exited the critical read section. while(true) { ! uintx cnt = OrderAccess::load_acquire(thread->get_rcu_counter()); // This checks if the thread's counter is active. And if so is the counter // for a pre-existing reader (belongs to this grace period). A pre-existing // reader will have a lower counter than the global counter version for this // generation. If the counter is larger than the global counter version this // is a new reader and we can continue. --- 39,49 ---- CounterThreadCheck(uintx gbl_cnt) : _gbl_cnt(gbl_cnt) {} void do_thread(Thread* thread) { SpinYield yield; // Loops on this thread until it has exited the critical read section. while(true) { ! uintx cnt = Atomic::load_acquire(thread->get_rcu_counter()); // This checks if the thread's counter is active. And if so is the counter // for a pre-existing reader (belongs to this grace period). A pre-existing // reader will have a lower counter than the global counter version for this // generation. If the counter is larger than the global counter version this // is a new reader and we can continue.
< prev index next >