< prev index next >
src/share/vm/gc/shared/workgroup.cpp
Print this page
rev 11970 : imported patch workgroup_volatiles
rev 11971 : imported patch workgroup_volatiles2
rev 11972 : imported patch workgroup_test
*** 470,481 ****
bool SequentialSubTasksDone::valid() {
return _n_threads > 0;
}
bool SequentialSubTasksDone::is_task_claimed(uint& t) {
! uint n_claimed = _n_claimed;
! t = n_claimed;
while (t < _n_tasks) {
jint res = Atomic::cmpxchg(t+1, &_n_claimed, t);
if (res == (jint)t) {
return false;
}
--- 470,480 ----
bool SequentialSubTasksDone::valid() {
return _n_threads > 0;
}
bool SequentialSubTasksDone::is_task_claimed(uint& t) {
! t = _n_claimed;
while (t < _n_tasks) {
jint res = Atomic::cmpxchg(t+1, &_n_claimed, t);
if (res == (jint)t) {
return false;
}
< prev index next >