src/hotspot/share/utilities/singleWriterSynchronizer.cpp
changeset 59247 56bf71d64d51
parent 51511 eb8d5aeabab3
child 59249 29b0d0b61615
equal deleted inserted replaced
59246:fcad92f425c5 59247:56bf71d64d51
    83   OrderAccess::fence();
    83   OrderAccess::fence();
    84   // (4) Wait for all the critical sections started before the change
    84   // (4) Wait for all the critical sections started before the change
    85   // to complete, e.g. for the value of old_ptr to catch up with old.
    85   // to complete, e.g. for the value of old_ptr to catch up with old.
    86   // Loop because there could be pending wakeups unrelated to this
    86   // Loop because there could be pending wakeups unrelated to this
    87   // synchronize request.
    87   // synchronize request.
    88   while (old != OrderAccess::load_acquire(old_ptr)) {
    88   while (old != Atomic::load_acquire(old_ptr)) {
    89     _wakeup.wait();
    89     _wakeup.wait();
    90   }
    90   }
    91   // (5) Drain any pending wakeups. A critical section exit may have
    91   // (5) Drain any pending wakeups. A critical section exit may have
    92   // completed our request and seen our _waiting_for before we checked
    92   // completed our request and seen our _waiting_for before we checked
    93   // for completion.  There are also possible (though rare) spurious
    93   // for completion.  There are also possible (though rare) spurious