| 44 | extern ClassAllocator<Event, false> eventAllocator; |
| 45 | |
| 46 | void |
| 47 | ProtectedQueue::enqueue(Event *e) |
| 48 | { |
| 49 | ink_assert(!e->in_the_prot_queue && !e->in_the_priority_queue); |
| 50 | EThread *e_ethread = e->ethread; |
| 51 | e->in_the_prot_queue = 1; |
| 52 | bool was_empty = (ink_atomiclist_push(&al, e) == nullptr); |
| 53 | |
| 54 | if (was_empty) { |
| 55 | EThread *inserting_thread = this_ethread(); |
| 56 | // queue e->ethread in the list of threads to be signalled |
| 57 | // inserting_thread == 0 means it is not a regular EThread |
| 58 | if (inserting_thread != e_ethread) { |
| 59 | e_ethread->tail_cb->signalActivity(); |
| 60 | } |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | void |
| 65 | ProtectedQueue::dequeue_external() |