X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=os%2Fos-linux.h;h=b786393f77d9ed6e596de5b63d20b7b1707d9a51;hb=37659335ac616d7c13bf8bfbb76366424b50ea67;hp=81d04027efb9491fde44c783922dc368734d5042;hpb=d004a209eee0a8db603c2d7ca6dc5fb6c367aa5a;p=fio.git diff --git a/os/os-linux.h b/os/os-linux.h index 81d04027..b786393f 100644 --- a/os/os-linux.h +++ b/os/os-linux.h @@ -15,6 +15,7 @@ #include #include #include +#include #include "binject.h" #include "../file.h" @@ -208,9 +209,21 @@ static inline int fio_lookup_raw(dev_t dev, int *majdev, int *mindev) #define FIO_MADV_FREE MADV_REMOVE #endif +#if defined(__builtin_bswap16) +#define fio_swap16(x) __builtin_bswap16(x) +#else #define fio_swap16(x) __bswap_16(x) +#endif +#if defined(__builtin_bswap32) +#define fio_swap32(x) __builtin_bswap32(x) +#else #define fio_swap32(x) __bswap_32(x) +#endif +#if defined(__builtin_bswap64) +#define fio_swap64(x) __builtin_bswap64(x) +#else #define fio_swap64(x) __bswap_64(x) +#endif #define CACHE_LINE_FILE \ "/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size" @@ -269,4 +282,10 @@ static inline int fio_set_sched_idle(void) } #endif +#ifndef POSIX_FADV_STREAMID +#define POSIX_FADV_STREAMID 8 +#endif + +#define FIO_HAVE_STREAMID + #endif