X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=os%2Fos-linux.h;h=a36552ba68ba93caf6ca58e5fc9761fc53c0b88d;hp=70c993b5de61d449051cfff989482a728cdfd2ad;hb=47f767c113be7448eb8aa9d4a9f9aa8f760ef642;hpb=e2e58886427019b525d2a234c5404a38ec0c7ebf diff --git a/os/os-linux.h b/os/os-linux.h index 70c993b5..a36552ba 100644 --- a/os/os-linux.h +++ b/os/os-linux.h @@ -41,6 +41,15 @@ #define FIO_HAVE_TRIM #define FIO_HAVE_BINJECT #define FIO_HAVE_CLOCK_MONOTONIC +#define FIO_HAVE_GETTID + +/* + * Can only enable this for newer glibcs, or the header and defines are + * missing + */ +#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 6 +#define FIO_HAVE_LINUX_FALLOCATE +#endif #ifdef SYNC_FILE_RANGE_WAIT_BEFORE #define FIO_HAVE_SYNC_FILE_RANGE @@ -101,6 +110,11 @@ static inline int ioprio_set(int which, int who, int ioprio) return syscall(__NR_ioprio_set, which, who, ioprio); } +static inline int gettid(void) +{ + return syscall(__NR_gettid); +} + /* * Just check for SPLICE_F_MOVE, if that isn't there, assume the others * aren't either.