| 12 | |
| 13 | |
| 14 | int |
| 15 | cirbuf_init(struct cirbuf *cbuf, char *buf, unsigned int start, unsigned int maxlen) |
| 16 | { |
| 17 | if (!cbuf || !buf) |
| 18 | return -EINVAL; |
| 19 | cbuf->maxlen = maxlen; |
| 20 | cbuf->len = 0; |
| 21 | cbuf->start = start; |
| 22 | cbuf->end = start; |
| 23 | cbuf->buf = buf; |
| 24 | return 0; |
| 25 | } |
| 26 | |
| 27 | /* multiple add */ |
| 28 |
no outgoing calls