| 3452 | } |
| 3453 | |
| 3454 | std::vector<TSAction> |
| 3455 | TSContScheduleOnEntirePool(TSCont contp, TSHRTime timeout, TSThreadPool tp) |
| 3456 | { |
| 3457 | sdk_assert(sdk_sanity_check_iocore_structure(contp) == TS_SUCCESS); |
| 3458 | |
| 3459 | /* ensure we are on a EThread */ |
| 3460 | sdk_assert(sdk_sanity_check_null_ptr((void *)this_ethread()) == TS_SUCCESS); |
| 3461 | |
| 3462 | INKContInternal *i = reinterpret_cast<INKContInternal *>(contp); |
| 3463 | |
| 3464 | // This is to allow the continuation to be scheduled on multiple threads |
| 3465 | sdk_assert(i->mutex == nullptr); |
| 3466 | |
| 3467 | EventType etype; |
| 3468 | |
| 3469 | switch (tp) { |
| 3470 | case TS_THREAD_POOL_NET: |
| 3471 | etype = ET_NET; |
| 3472 | break; |
| 3473 | case TS_THREAD_POOL_TASK: |
| 3474 | etype = ET_TASK; |
| 3475 | break; |
| 3476 | case TS_THREAD_POOL_DNS: |
| 3477 | etype = ET_DNS; |
| 3478 | break; |
| 3479 | case TS_THREAD_POOL_UDP: |
| 3480 | etype = ET_UDP; |
| 3481 | break; |
| 3482 | default: |
| 3483 | etype = ET_TASK; |
| 3484 | break; |
| 3485 | } |
| 3486 | |
| 3487 | if (ink_atomic_increment(static_cast<int *>(&i->m_event_count), eventProcessor.thread_group[etype]._count) < 0) { |
| 3488 | ink_assert(!"not reached"); |
| 3489 | } |
| 3490 | |
| 3491 | return eventProcessor.schedule_entire(i, HRTIME_MSECONDS(timeout), 0, etype, timeout == 0 ? EVENT_IMMEDIATE : EVENT_INTERVAL); |
| 3492 | } |
| 3493 | |
| 3494 | TSAction |
| 3495 | TSContScheduleEveryOnPool(TSCont contp, TSHRTime every, TSThreadPool tp) |
no test coverage detected