MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / other_thread

Function other_thread

examples/libc/sem.c:15–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13
14static sem_t sema;
15static 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
33static void test_thread(void* parameter)
34{

Callers

nothing calls this directly

Calls 4

sem_postFunction · 0.85
pthread_exitFunction · 0.85
sleepFunction · 0.70
printfFunction · 0.50

Tested by

no test coverage detected