MCPcopy Create free account
hub / github.com/apache/trafficserver / thread_create_handler

Function thread_create_handler

src/api/InkAPITest.cc:2287–2309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2285static void *thread_create_handler(void *arg);
2286
2287static void *
2288thread_create_handler(void * /* arg ATS_UNUSED */)
2289{
2290 TSThread athread;
2291 // Fix me: do more useful work
2292 sleep(10);
2293
2294 athread = TSThreadSelf();
2295 if (athread == nullptr) {
2296 thread_err_count++;
2297 SDK_RPRINT(SDK_Thread_test, "TSThreadCreate", "TestCase2", TC_FAIL, "can't get thread");
2298 } else {
2299 SDK_RPRINT(SDK_Thread_test, "TSThreadCreate", "TestCase2", TC_PASS, "ok");
2300 }
2301
2302 if (thread_err_count > 0) {
2303 *SDK_Thread_pstatus = REGRESSION_TEST_FAILED;
2304 } else {
2305 *SDK_Thread_pstatus = REGRESSION_TEST_PASSED;
2306 }
2307
2308 return nullptr;
2309}
2310
2311// Argument data passed to thread init functions
2312// cannot be allocated on the stack.

Callers

nothing calls this directly

Calls 2

TSThreadSelfFunction · 0.85
SDK_RPRINTFunction · 0.85

Tested by

no test coverage detected