X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=os%2Fos-openbsd.h;h=f1bad67165e982c4da1ecc743887ec8e4bbe056c;hb=9943adfb8adf50e6f54ab6aff613c99a3a75d224;hp=43a649d447bcaeaa3d72f6cdd4dcd58194bd4393;hpb=998baa29f571df9d2e4b626bedd317a2fd28c68a;p=fio.git diff --git a/os/os-openbsd.h b/os/os-openbsd.h index 43a649d4..f1bad671 100644 --- a/os/os-openbsd.h +++ b/os/os-openbsd.h @@ -31,11 +31,15 @@ #define PTHREAD_STACK_MIN 4096 #endif -#define fio_swap16(x) bswap16(x) -#define fio_swap32(x) bswap32(x) -#define fio_swap64(x) bswap64(x) - -typedef off_t off64_t; +#define fio_swap16(x) swap16(x) +#define fio_swap32(x) swap32(x) +#define fio_swap64(x) swap64(x) + +#ifdef CONFIG_PTHREAD_GETAFFINITY +#define FIO_HAVE_GET_THREAD_AFFINITY +#define fio_get_thread_affinity(mask) \ + pthread_getaffinity_np(pthread_self(), sizeof(mask), &(mask)) +#endif static inline int blockdev_size(struct fio_file *f, unsigned long long *bytes) {