299 |
|
* with corresponding waiting node, pop both from |
300 |
|
* stack, and return matched item. The matching or |
301 |
|
* unlinking might not actually be necessary because of |
302 |
< |
* another threads performing action 3: |
302 |
> |
* other threads performing action 3: |
303 |
|
* |
304 |
|
* 3. If top of stack already holds another fulfilling node, |
305 |
|
* help it out by doing its match and/or pop |
622 |
|
for (;;) { |
623 |
|
QNode t = tail; |
624 |
|
QNode h = head; |
625 |
< |
if (t == null || h == null) // saw uninitialized values |
625 |
> |
if (t == null || h == null) // saw uninitialized value |
626 |
|
continue; // spin |
627 |
|
|
628 |
|
if (h == t || t.isData == isData) { // empty or same-mode |