summaryrefslogtreecommitdiff
path: root/fifo.h
diff options
context:
space:
mode:
authorBruce Cran <bruce@cran.org.uk>2011-01-02 20:14:54 +0100
committerJens Axboe <jaxboe@fusionio.com>2011-01-02 20:14:54 +0100
commit03e20d687566753b90383571e5e152c5142bdffd (patch)
tree062419c9a907354a95fe53e88b6ca3a143689d7e /fifo.h
parent2d7760d1dbbc742a0699b959ffcd8742b9db9e2c (diff)
downloadfio-03e20d687566753b90383571e5e152c5142bdffd.tar.gz
fio-03e20d687566753b90383571e5e152c5142bdffd.tar.bz2
First snapshot of FIO for Windows
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'fifo.h')
-rw-r--r--fifo.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fifo.h b/fifo.h
index 8e34fb61..74913653 100644
--- a/fifo.h
+++ b/fifo.h
@@ -40,15 +40,19 @@ static inline unsigned int fifo_room(struct fifo *fifo)
return fifo->size - fifo->in + fifo->out;
}
+#ifndef min
#define min(x,y) ({ \
typeof(x) _x = (x); \
typeof(y) _y = (y); \
(void) (&_x == &_y); \
_x < _y ? _x : _y; })
+#endif
+#ifndef max
#define max(x,y) ({ \
typeof(x) _x = (x); \
typeof(y) _y = (y); \
(void) (&_x == &_y); \
_x > _y ? _x : _y; })
+#endif