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

Function libc_ex4

examples/libc/ex4.c:102–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102int libc_ex4()
103{
104 char * res;
105 pthread_t th1, th2;
106
107 // res = str_accumulate("Result of ");
108 pthread_create(&th1, NULL, process, (void *) "first");
109 pthread_create(&th2, NULL, process, (void *) "second");
110 // res = str_accumulate("initial thread");
111 printf("Thread %lx: \"%s\"\n", pthread_self(), res);
112 pthread_join(th1, NULL);
113 pthread_join(th2, NULL);
114}
115#include <finsh.h>
116FINSH_FUNCTION_EXPORT(libc_ex4, example 4 for libc);

Callers

nothing calls this directly

Calls 4

pthread_createFunction · 0.85
pthread_selfFunction · 0.85
pthread_joinFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected