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

Function libc_ex5

examples/libc/ex5.c:97–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97int libc_ex5(void)
98{
99 pthread_t th_a, th_b;
100 void * retval;
101
102 init(&buffer);
103 /* Create the threads */
104 pthread_create(&th_a, NULL, producer, 0);
105 pthread_create(&th_b, NULL, consumer, 0);
106 /* Wait until producer and consumer finish. */
107 pthread_join(th_a, &retval);
108 pthread_join(th_b, &retval);
109 return 0;
110}
111#include <finsh.h>
112FINSH_FUNCTION_EXPORT(libc_ex5, example 5 for libc);
113

Callers

nothing calls this directly

Calls 3

pthread_createFunction · 0.85
pthread_joinFunction · 0.85
initFunction · 0.70

Tested by

no test coverage detected