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

Function pthread_start_func

src/api/InkAPITest.cc:2360–2387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2358static void *pthread_start_func(void *arg);
2359
2360static void *
2361pthread_start_func(void * /* arg ATS_UNUSED */)
2362{
2363 TSThread temp_thread = nullptr;
2364
2365 // TSThreadInit
2366 temp_thread = TSThreadInit();
2367
2368 if (!temp_thread) {
2369 SDK_RPRINT(SDK_ThreadInit_test, "TSThreadInit", "TestCase2", TC_FAIL, "can't init thread");
2370 thread_init_err_count++;
2371 } else {
2372 SDK_RPRINT(SDK_ThreadInit_test, "TSThreadInit", "TestCase2", TC_PASS, "ok");
2373 }
2374
2375 // Clean up this thread
2376 if (temp_thread) {
2377 TSThreadDestroy(temp_thread);
2378 }
2379
2380 if (thread_init_err_count > 0) {
2381 *SDK_ThreadInit_pstatus = REGRESSION_TEST_FAILED;
2382 } else {
2383 *SDK_ThreadInit_pstatus = REGRESSION_TEST_PASSED;
2384 }
2385
2386 return nullptr;
2387}
2388
2389REGRESSION_TEST(SDK_API_TSThreadInit)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
2390{

Callers

nothing calls this directly

Calls 3

TSThreadInitFunction · 0.85
SDK_RPRINTFunction · 0.85
TSThreadDestroyFunction · 0.85

Tested by

no test coverage detected