netbsd: fix gettid
[fio.git] / os / os-netbsd.h
index 78ac135f9ea035eddb02fb01e34e29a6e0e6eae6..de687ba386103b7e40be350724d4262b2894fa06 100644 (file)
@@ -4,8 +4,8 @@
 #define        FIO_OS  os_netbsd
 
 #include <errno.h>
+#include <lwp.h>
 #include <sys/param.h>
-#include <sys/thr.h>
 #include <sys/endian.h>
 /* XXX hack to avoid confilcts between rbtree.h and <sys/rb.h> */
 #define        rb_node _rb_node
@@ -23,6 +23,7 @@
 #define FIO_HAVE_FDATASYNC
 #define FIO_USE_GENERIC_BDEV_SIZE
 #define FIO_USE_GENERIC_RAND
+#define FIO_USE_GENERIC_INIT_RANDOM_STATE
 #define FIO_HAVE_GETTID
 
 #undef FIO_HAVE_CPU_AFFINITY   /* XXX notyet */
@@ -62,10 +63,7 @@ static inline unsigned long long os_phys_mem(void)
 
 static inline int gettid(void)
 {
-       long lwpid;
-
-       thr_self(&lwpid);
-       return (int) lwpid;
+       return (int) _lwp_self();
 }
 
 #ifdef MADV_FREE