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

Function init

examples/libc/ex5.c:30–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28/* Initialize a buffer */
29
30void init(struct prodcons * b)
31{
32 sem_init(&b->sem_write, 0, BUFFER_SIZE - 1);
33 sem_init(&b->sem_read, 0, 0);
34 b->readpos = 0;
35 b->writepos = 0;
36}
37
38/* Store an integer in the buffer */
39

Callers 1

libc_ex5Function · 0.70

Calls 1

sem_initFunction · 0.85

Tested by

no test coverage detected