X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=os%2Fos-hpux.h;h=9f3d76f50719736c998e76dbe4e30f1cfdd067e6;hb=HEAD;hp=6a240b0d0609f5517284df389ff10d515db0f991;hpb=06eac6b2318da7759a055c4a3ac01c2c1e8aa764;p=fio.git diff --git a/os/os-hpux.h b/os/os-hpux.h index 6a240b0d..9f3d76f5 100644 --- a/os/os-hpux.h +++ b/os/os-hpux.h @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include #include @@ -20,7 +20,6 @@ #include "../file.h" #define FIO_HAVE_ODIRECT -#define FIO_USE_GENERIC_RAND #define FIO_USE_GENERIC_INIT_RANDOM_STATE #define FIO_HAVE_CHARDEV_SIZE @@ -39,6 +38,13 @@ #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) @@ -82,9 +88,9 @@ static inline unsigned long long os_phys_mem(void) 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); }