1036 |
|
ForkJoinTask<?> t = (ForkJoinTask<?>) U.getObject(a, offset); |
1037 |
|
if (t == task && |
1038 |
|
U.compareAndSwapInt(this, QLOCK, 0, 1)) { |
1039 |
< |
if (U.compareAndSwapObject(a, offset, task, null)) { |
1039 |
> |
if (top == s + 1 && array == a && |
1040 |
> |
U.compareAndSwapObject(a, offset, task, null)) { |
1041 |
|
popped = true; |
1042 |
|
top = s; |
1043 |
|
} |
1223 |
|
for (CountedCompleter<?> r = t;;) { |
1224 |
|
if (r == task) { |
1225 |
|
if ((mode & IS_OWNED) == 0) { |
1226 |
< |
boolean popped; |
1226 |
> |
boolean popped = false; |
1227 |
|
if (U.compareAndSwapInt(this, QLOCK, 0, 1)) { |
1228 |
< |
if (popped = |
1228 |
> |
if (top == s && array == a && |
1229 |
|
U.compareAndSwapObject(a, offset, |
1230 |
< |
t, null)) |
1230 |
> |
t, null)) { |
1231 |
> |
popped = true; |
1232 |
|
top = s - 1; |
1233 |
+ |
} |
1234 |
|
U.putOrderedInt(this, QLOCK, 0); |
1235 |
|
if (popped) |
1236 |
|
return t; |