src/hotspot/share/utilities/globalCounter.cpp
changeset 59247 56bf71d64d51
parent 52452 3315e47741c7
child 59249 29b0d0b61615
equal deleted inserted replaced
59246:fcad92f425c5 59247:56bf71d64d51
    39   CounterThreadCheck(uintx gbl_cnt) : _gbl_cnt(gbl_cnt) {}
    39   CounterThreadCheck(uintx gbl_cnt) : _gbl_cnt(gbl_cnt) {}
    40   void do_thread(Thread* thread) {
    40   void do_thread(Thread* thread) {
    41     SpinYield yield;
    41     SpinYield yield;
    42     // Loops on this thread until it has exited the critical read section.
    42     // Loops on this thread until it has exited the critical read section.
    43     while(true) {
    43     while(true) {
    44       uintx cnt = OrderAccess::load_acquire(thread->get_rcu_counter());
    44       uintx cnt = Atomic::load_acquire(thread->get_rcu_counter());
    45       // This checks if the thread's counter is active. And if so is the counter
    45       // This checks if the thread's counter is active. And if so is the counter
    46       // for a pre-existing reader (belongs to this grace period). A pre-existing
    46       // for a pre-existing reader (belongs to this grace period). A pre-existing
    47       // reader will have a lower counter than the global counter version for this
    47       // reader will have a lower counter than the global counter version for this
    48       // generation. If the counter is larger than the global counter version this
    48       // generation. If the counter is larger than the global counter version this
    49       //  is a new reader and we can continue.
    49       //  is a new reader and we can continue.