X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=fifo.h;h=8e34fb61f3675fa250696e5bf92348dfe531b2bc;hb=7a4b80a14c6ac6d47d486b1f5d1f166fa7065ee3;hp=cfacea996f0309b323b93b67a79f1b89d555dd2b;hpb=38470f85fa4acddab4339db9c8805a19bc87578e;p=fio.git diff --git a/fifo.h b/fifo.h index cfacea99..8e34fb61 100644 --- a/fifo.h +++ b/fifo.h @@ -35,6 +35,11 @@ static inline unsigned int fifo_len(struct fifo *fifo) return fifo->in - fifo->out; } +static inline unsigned int fifo_room(struct fifo *fifo) +{ + return fifo->size - fifo->in + fifo->out; +} + #define min(x,y) ({ \ typeof(x) _x = (x); \ typeof(y) _y = (y); \