| 3320 | //////////////////////////////////////////////////////////////////// |
| 3321 | |
| 3322 | TSCont |
| 3323 | TSContCreate(TSEventFunc funcp, TSMutex mutexp) |
| 3324 | { |
| 3325 | // mutexp can be null |
| 3326 | if (mutexp != nullptr) { |
| 3327 | sdk_assert(sdk_sanity_check_mutex(mutexp) == TS_SUCCESS); |
| 3328 | } |
| 3329 | |
| 3330 | if (pluginThreadContext) { |
| 3331 | pluginThreadContext->acquire(); |
| 3332 | } |
| 3333 | |
| 3334 | INKContInternal *i = THREAD_ALLOC(INKContAllocator, this_thread()); |
| 3335 | |
| 3336 | i->init(funcp, mutexp, pluginThreadContext); |
| 3337 | return reinterpret_cast<TSCont>(i); |
| 3338 | } |
| 3339 | |
| 3340 | void |
| 3341 | TSContDestroy(TSCont contp) |