| 95 | } |
| 96 | |
| 97 | int 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> |
| 112 | FINSH_FUNCTION_EXPORT(libc_ex5, example 5 for libc); |
| 113 |
nothing calls this directly
no test coverage detected