#include <errno.h>
#include <unistd.h>
#include <sys/ioctl.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
#include <sys/fadvise.h>
#include <sys/mman.h>
#include <sys/mpctl.h>
#include "../file.h"
#define FIO_HAVE_ODIRECT
-#define FIO_USE_GENERIC_RAND
#define FIO_USE_GENERIC_INIT_RANDOM_STATE
-#define FIO_HAVE_PSHARED_MUTEX
#define FIO_HAVE_CHARDEV_SIZE
#define OS_MAP_ANON MAP_ANONYMOUS
#define FIO_USE_GENERIC_SWAP
#define FIO_OS_HAVE_AIOCB_TYPEDEF
+
+#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
+
typedef struct aiocb64 os_aiocb_t;
static inline int blockdev_invalidate_cache(struct fio_file *f)
{
- return EINVAL;
+ return ENOTSUP;
}
static inline int blockdev_size(struct fio_file *f, unsigned long long *bytes)
return ret;
}
-#define FIO_HAVE_CPU_ONLINE_SYSCONF
+#define FIO_HAVE_CPU_CONF_SYSCONF
-static inline unsigned int cpus_online(void)
+static inline unsigned int cpus_configured(void)
{
return mpctl(MPC_GETNUMSPUS, 0, NULL);
}