src/share/vm/utilities/taskqueue.hpp

changeset 9806
758c07667682
parent 9756
2be326848943
parent 9784
775e2bf92114
child 10015
eb7ce841ccec
equal deleted inserted replaced
9762:c97db0855565 9806:758c07667682
789 TASKQUEUE_STATS_ONLY(stats.record_pop()); 789 TASKQUEUE_STATS_ONLY(stats.record_pop());
790 return true; 790 return true;
791 } else { 791 } else {
792 // Otherwise, the queue contained exactly one element; we take the slow 792 // Otherwise, the queue contained exactly one element; we take the slow
793 // path. 793 // path.
794
795 // The barrier is required to prevent reordering the two reads of _age:
796 // one is the _age.get() below, and the other is _age.top() above the if-stmt.
797 // The algorithm may fail if _age.get() reads an older value than _age.top().
798 OrderAccess::loadload();
794 return pop_local_slow(localBot, _age.get()); 799 return pop_local_slow(localBot, _age.get());
795 } 800 }
796 } 801 }
797 802
798 typedef GenericTaskQueue<oop, mtGC> OopTaskQueue; 803 typedef GenericTaskQueue<oop, mtGC> OopTaskQueue;

mercurial