X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=os%2Fos.h;h=2eb38e87afda20dae2b52ebd65d1dfc146247e23;hp=4bbdd623a987c174122b2577b2899332605a0a0c;hb=e97c14423a5688d7adfb342c16363c263cb741f9;hpb=4b0c257cd785cf7af4a4722f41bd45174283f69d diff --git a/os/os.h b/os/os.h index 4bbdd623..2eb38e87 100644 --- a/os/os.h +++ b/os/os.h @@ -18,6 +18,8 @@ #include "os-mac.h" #elif defined(_AIX) #include "os-aix.h" +#elif defined(__hpux) +#include "os-hpux.h" #elif defined(__CYGWIN__) #include "os-windows.h" #else @@ -30,6 +32,9 @@ #ifdef FIO_HAVE_POSIXAIO #include +#ifndef FIO_OS_HAVE_AIOCB_TYPEDEF +typedef struct aiocb os_aiocb_t; +#endif #endif #ifdef FIO_HAVE_SGIO @@ -178,4 +183,18 @@ static inline unsigned long long get_fs_size(const char *path) } #endif +#ifndef FIO_HAVE_CPU_ONLINE_SYSCONF +static inline unsigned int cpus_online(void) +{ + return sysconf(_SC_NPROCESSORS_ONLN); +} +#endif + +#ifndef FIO_HAVE_GETTID +static inline int gettid(void) +{ + return getpid(); +} +#endif + #endif