| 62 | } |
| 63 | |
| 64 | void |
| 65 | ProtectedQueue::dequeue_external() |
| 66 | { |
| 67 | Event *e = static_cast<Event *>(ink_atomiclist_popall(&al)); |
| 68 | // invert the list, to preserve order |
| 69 | SLL<Event, Event::Link_link> l, t; |
| 70 | t.head = e; |
| 71 | while ((e = t.pop())) { |
| 72 | l.push(e); |
| 73 | } |
| 74 | // insert into localQueue |
| 75 | while ((e = l.pop())) { |
| 76 | if (!e->cancelled) { |
| 77 | localQueue.enqueue(e); |
| 78 | } else { |
| 79 | e->mutex = nullptr; |
| 80 | eventAllocator.free(e); |
| 81 | } |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | void |
| 86 | ProtectedQueue::wait(ink_hrtime timeout) |
no test coverage detected