| 145 | } |
| 146 | |
| 147 | void |
| 148 | EThread::process_event(Event *e, int calling_code) |
| 149 | { |
| 150 | ink_assert((!e->in_the_prot_queue && !e->in_the_priority_queue)); |
| 151 | WEAK_MUTEX_TRY_LOCK(lock, e->mutex, this); |
| 152 | if (!lock.is_locked()) { |
| 153 | e->timeout_at = ink_get_hrtime() + DELAY_FOR_RETRY; |
| 154 | EventQueueExternal.enqueue_local(e); |
| 155 | } else { |
| 156 | if (e->cancelled) { |
| 157 | MUTEX_RELEASE(lock); |
| 158 | free_event(e); |
| 159 | return; |
| 160 | } |
| 161 | Continuation *c_temp = e->continuation; |
| 162 | |
| 163 | // Restore the client IP debugging flags |
| 164 | set_cont_flags(e->continuation->control_flags); |
| 165 | |
| 166 | e->continuation->handleEvent(calling_code, e); |
| 167 | ink_assert(!e->in_the_priority_queue); |
| 168 | ink_assert(c_temp == e->continuation); |
| 169 | MUTEX_RELEASE(lock); |
| 170 | if (e->period) { |
| 171 | if (!e->in_the_prot_queue && !e->in_the_priority_queue) { |
| 172 | if (e->period < 0) { |
| 173 | e->timeout_at = e->period; |
| 174 | } else { |
| 175 | e->timeout_at = ink_get_hrtime() + e->period; |
| 176 | } |
| 177 | EventQueueExternal.enqueue_local(e); |
| 178 | } |
| 179 | } else if (!e->in_the_prot_queue && !e->in_the_priority_queue) { |
| 180 | free_event(e); |
| 181 | } |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | void |
| 186 | EThread::process_queue(Que(Event, link) * NegativeQueue, int *ev_count, int *nq_count) |
nothing calls this directly
no test coverage detected