| 13 | |
| 14 | static sem_t sema; |
| 15 | static void* other_thread() |
| 16 | { |
| 17 | printf("other_thread here!\n"); |
| 18 | |
| 19 | sleep(1); |
| 20 | |
| 21 | while (1) |
| 22 | { |
| 23 | printf("other_thread: sem_post...\n"); |
| 24 | if(sem_post(&sema) == -1) |
| 25 | printf("sem_post failed\n"); |
| 26 | sleep(1); |
| 27 | } |
| 28 | |
| 29 | printf("other_thread dies!\n"); |
| 30 | pthread_exit(0); |
| 31 | } |
| 32 | |
| 33 | static void test_thread(void* parameter) |
| 34 | { |
nothing calls this directly
no test coverage detected