projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
verify: don't adjust verification length based on interval when unaligned
[fio.git]
/
fifo.h
diff --git
a/fifo.h
b/fifo.h
index 749136530a2c5410867f10caf672c155949daa2f..5e3d33967a1a1ffe1e1cecf06fabbde0f4015d06 100644
(file)
--- a/
fifo.h
+++ b/
fifo.h
@@
-1,3
+1,5
@@
+#ifndef FIO_FIFO_H
+#define FIO_FIFO_H
/*
* A simple FIFO implementation.
*
/*
* A simple FIFO implementation.
*
@@
-15,9
+17,11
@@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc.,
675 Mass Ave, Cambridge, MA 02139
, USA.
+ * Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
, USA.
*
*/
*
*/
+#include "minmax.h"
+
struct fifo {
unsigned char *buffer; /* the buffer holding the data */
unsigned int size; /* the size of the allocated buffer */
struct fifo {
unsigned char *buffer; /* the buffer holding the data */
unsigned int size; /* the size of the allocated buffer */
@@
-40,19
+44,4
@@
static inline unsigned int fifo_room(struct fifo *fifo)
return fifo->size - fifo->in + fifo->out;
}
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
#endif