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