| 2358 | static void *pthread_start_func(void *arg); |
| 2359 | |
| 2360 | static void * |
| 2361 | pthread_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 | |
| 2389 | REGRESSION_TEST(SDK_API_TSThreadInit)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus) |
| 2390 | { |
nothing calls this directly
no test coverage detected