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);	\