Fix silly bug in ringbuf procedures.
@@ -51,7 +51,7 @@ int ringbuf_read(ringbuf_t *buf, uio_t *uio) {
int res = uiomove((char *)buf->data + buf->tail, size, uio);
if (res)
return res;
- produce(buf, size);
+ consume(buf, size);
}
return 0;
}
@@ -68,7 +68,7 @@ int ringbuf_write(ringbuf_t *buf, uio_t *uio) {
int res = uiomove((char *)buf->data + buf->head, size, uio);
if (res)
return res;
- consume(buf, size);
+ produce(buf, size);
}
return 0;
}
