MCPcopy Index your code
hub / github.com/RT-Thread/rt-thread / libc_ex2

Function libc_ex2

examples/libc/ex2.c:107–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107int libc_ex2(void)
108{
109 pthread_t th_a, th_b;
110 void * retval;
111
112 init(&buffer);
113 /* Create the threads */
114 pthread_create(&th_a, NULL, producer, 0);
115 pthread_create(&th_b, NULL, consumer, 0);
116 /* Wait until producer and consumer finish. */
117 pthread_join(th_a, &retval);
118 pthread_join(th_b, &retval);
119 return 0;
120}
121#include <finsh.h>
122FINSH_FUNCTION_EXPORT(libc_ex2, example 2 for libc);

Callers

nothing calls this directly

Calls 3

pthread_createFunction · 0.85
pthread_joinFunction · 0.85
initFunction · 0.70

Tested by

no test coverage detected