| 2285 | static void *thread_create_handler(void *arg); |
| 2286 | |
| 2287 | static void * |
| 2288 | thread_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. |
nothing calls this directly
no test coverage detected