| 214 | } |
| 215 | |
| 216 | TS_INLINE Event * |
| 217 | EThread::schedule_spawn(Continuation *c, int ev, void *cookie) |
| 218 | { |
| 219 | ink_assert(this != this_ethread()); // really broken to call this from the same thread. |
| 220 | if (start_event) { |
| 221 | free_event(start_event); |
| 222 | } |
| 223 | start_event = EVENT_ALLOC(eventAllocator, this); |
| 224 | start_event->ethread = this; |
| 225 | start_event->mutex = this->mutex; |
| 226 | start_event->init(c); |
| 227 | start_event->callback_event = ev; |
| 228 | start_event->cookie = cookie; |
| 229 | return start_event; |
| 230 | } |
| 231 | |
| 232 | TS_INLINE EThread * |
| 233 | this_ethread() |