projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix crash with multiple files
[fio.git]
/
fifo.h
diff --git
a/fifo.h
b/fifo.h
index cfacea996f0309b323b93b67a79f1b89d555dd2b..8e34fb61f3675fa250696e5bf92348dfe531b2bc 100644
(file)
--- 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); \