Lines Matching full:fifo
11 #include "../fifo.h"
170 * fifo refill frontend, to avoid reading data in trace sized bites
172 static int refill_fifo(struct fifo *fifo, int fd)
179 if (total > fifo_room(fifo))
180 total = fifo_room(fifo);
189 ret = fifo_put(fifo, buf, ret);
195 * Retrieve 'len' bytes from the fifo, refilling if necessary.
197 static int trace_fifo_get(struct fifo *fifo, int fd, void *buf,
200 if (fifo_len(fifo) < len) {
201 int ret = refill_fifo(fifo, fd);
207 return fifo_get(fifo, buf, len);
213 static int discard_pdu(struct fifo *fifo, int fd, struct blk_io_trace *t)
218 return trace_fifo_get(fifo, fd, NULL, t->pdu_len);
484 struct fifo *fifo;
493 fifo = fifo_alloc(TRACE_FIFO_SIZE);
497 ret = trace_fifo_get(fifo, fd, &t, sizeof(t));
503 log_err("fio: short fifo get\n");
518 ret = discard_pdu(fifo, fd, &t);
535 fifo_free(fifo);
547 fifo_free(fifo);