< prev index next >
src/share/vm/gc/shared/taskqueue.hpp
Print this page
rev 10742 : Make fields used in lock-free algorithms volatile
@@ -124,11 +124,11 @@
idx_t top() const volatile { return _fields._top; }
idx_t tag() const volatile { return _fields._tag; }
// Increment top; if it wraps, increment tag also.
- void increment() {
+ void increment() volatile {
_fields._top = increment_index(_fields._top);
if (_fields._top == 0) ++_fields._tag;
}
Age cmpxchg(const Age new_age, const Age old_age) volatile;
< prev index next >