src/share/vm/utilities/taskqueue.hpp

changeset 9784
775e2bf92114
parent 9728
fa7fe6dae563
child 9806
758c07667682
child 9982
72053ed6f8d4
equal deleted inserted replaced
9783:14b0d7d60628 9784:775e2bf92114
712 TASKQUEUE_STATS_ONLY(stats.record_pop()); 712 TASKQUEUE_STATS_ONLY(stats.record_pop());
713 return true; 713 return true;
714 } else { 714 } else {
715 // Otherwise, the queue contained exactly one element; we take the slow 715 // Otherwise, the queue contained exactly one element; we take the slow
716 // path. 716 // path.
717
718 // The barrier is required to prevent reordering the two reads of _age:
719 // one is the _age.get() below, and the other is _age.top() above the if-stmt.
720 // The algorithm may fail if _age.get() reads an older value than _age.top().
721 OrderAccess::loadload();
717 return pop_local_slow(localBot, _age.get()); 722 return pop_local_slow(localBot, _age.get());
718 } 723 }
719 } 724 }
720 725
721 typedef GenericTaskQueue<oop, mtGC> OopTaskQueue; 726 typedef GenericTaskQueue<oop, mtGC> OopTaskQueue;

mercurial