X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=os-linux.h;h=1ed3d3b650b206921c0c22a5b1e3c656820d228e;hb=1020a139beff50faf1bb18f761b024b664a09e14;hp=b147d4f3b340c0fd2bb5f352b469beb97e6b57e7;hpb=1df341ff45360d5d1a4f942f76862f11a0da8fa6;p=fio.git diff --git a/os-linux.h b/os-linux.h index b147d4f3..1ed3d3b6 100644 --- a/os-linux.h +++ b/os-linux.h @@ -20,13 +20,6 @@ #define FIO_HAVE_ODIRECT #define FIO_HAVE_HUGETLB -/* - * Only for x86 currently - */ -#if defined(__i386__) -#define FIO_HAVE_SYSLET -#endif - #define OS_MAP_ANON (MAP_ANONYMOUS) typedef cpu_set_t os_cpu_mask_t; @@ -39,7 +32,7 @@ typedef struct drand48_data os_random_state_t; posix_fadvise((fd), (off_t)(off), (len), (advice)) #define fio_setaffinity(td) \ - sched_setaffinity((td)->pid, sizeof((td)->cpumask), &(td)->cpumask) + sched_setaffinity((td)->pid, sizeof((td)->o.cpumask), &(td)->o.cpumask) #define fio_getaffinity(pid, ptr) \ sched_getaffinity((pid), sizeof(cpu_set_t), (ptr)) @@ -102,9 +95,9 @@ async_wait(unsigned long min_wait_events, unsigned long user_ring_idx, user_ring_idx, ahu); } -static inline long async_thread(void) +static inline long async_thread(void *event, struct async_head_user *ahu) { - return syscall(__NR_async_thread); + return syscall(__NR_async_thread, event, ahu); } static inline long umem_add(unsigned long *uptr, unsigned long inc) @@ -131,10 +124,7 @@ enum { static inline int blockdev_invalidate_cache(int fd) { - if (!ioctl(fd, BLKFLSBUF)) - return 0; - - return errno; + return ioctl(fd, BLKFLSBUF); } static inline int blockdev_size(int fd, unsigned long long *bytes)