Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
30
void 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_ex5
Function · 0.70
Calls
1
sem_init
Function · 0.85
Tested by
no test coverage detected