| 28 | ////////////////////////////////////////////////////////////////////////// |
| 29 | |
| 30 | static void test_thread(void) |
| 31 | { |
| 32 | const char* myname = "test_thread"; |
| 33 | mythread thr; |
| 34 | |
| 35 | thr.set_detachable(false); |
| 36 | if (thr.start() == false) |
| 37 | { |
| 38 | printf("start thread failed\r\n"); |
| 39 | return; |
| 40 | } |
| 41 | |
| 42 | printf("%s: thread id is %lu, main thread id: %lu\r\n", |
| 43 | myname, thr.thread_id(), acl::thread::thread_self()); |
| 44 | |
| 45 | printf("begin wait for thread exit\r\n"); |
| 46 | if (thr.wait(NULL) == false) |
| 47 | printf("wait thread failed\r\n"); |
| 48 | else |
| 49 | printf("wait thread ok\r\n"); |
| 50 | } |
| 51 | |
| 52 | static void test_thread2(void) |
| 53 | { |
no test coverage detected
searching dependent graphs…