X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=os%2Fos-openbsd.h;h=9c7092c8ef4908a682323b4065d18445430bc076;hp=3343cbdfbb18384ded0d4cfe0b145216cbf27590;hb=227d026f88a4264ef717230990c82910ee3619fc;hpb=c7334fa3f3be87854354044615b0c0e473c50713 diff --git a/os/os-openbsd.h b/os/os-openbsd.h index 3343cbdf..9c7092c8 100644 --- a/os/os-openbsd.h +++ b/os/os-openbsd.h @@ -22,6 +22,7 @@ #define FIO_USE_GENERIC_INIT_RANDOM_STATE #define FIO_HAVE_FS_STAT #define FIO_HAVE_GETTID +#define FIO_HAVE_SHM_ATTACH_REMOVED #undef FIO_HAVE_CPU_AFFINITY /* XXX notyet */ @@ -52,7 +53,7 @@ static inline int blockdev_size(struct fio_file *f, unsigned long long *bytes) static inline int blockdev_invalidate_cache(struct fio_file *f) { - return EINVAL; + return ENOTSUP; } static inline unsigned long long os_phys_mem(void) @@ -67,7 +68,7 @@ static inline unsigned long long os_phys_mem(void) static inline int gettid(void) { - return (int) pthread_self(); + return (int)(intptr_t) pthread_self(); } static inline unsigned long long get_fs_free_size(const char *path) @@ -87,4 +88,12 @@ static inline unsigned long long get_fs_free_size(const char *path) #define FIO_MADV_FREE MADV_FREE #endif +static inline int shm_attach_to_open_removed(void) +{ + /* + * XXX: Return 1 if >= OpenBSD 5.1 according to 97900ebf. + */ + return 0; +} + #endif