commit | 104bc4bdf55bd79c2b3f9087601c3df4aa884b2a | [log] [tgz] |
---|---|---|
author | Jens Axboe <jens.axboe@oracle.com> | Wed May 16 11:54:43 2007 +0200 |
committer | Jens Axboe <jens.axboe@oracle.com> | Wed May 16 11:54:43 2007 +0200 |
tree | 1b08b9baf6630ce61ce615d35fe2d1ee2ded865a | |
parent | 0db2679750e4cc8f38af7af135f1ba8481d6def6 [diff] [blame] |
fifo updates
diff --git a/fifo.h b/fifo.h index cfacea9..8e34fb6 100644 --- a/fifo.h +++ b/fifo.h
@@ -35,6 +35,11 @@ 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); \