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

Function init

examples/libc/ex2.c:31–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29/* Initialize a buffer */
30
31static void init(struct prodcons * b)
32{
33 pthread_mutex_init(&b->lock, NULL);
34 pthread_cond_init(&b->notempty, NULL);
35 pthread_cond_init(&b->notfull, NULL);
36 b->readpos = 0;
37 b->writepos = 0;
38}
39
40/* Store an integer in the buffer */
41static void put(struct prodcons * b, int data)

Callers 1

libc_ex2Function · 0.70

Calls 2

pthread_mutex_initFunction · 0.85
pthread_cond_initFunction · 0.85

Tested by

no test coverage detected