projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8d588e
)
gettid() for NetBSD
author
Jens Axboe
<jaxboe@fusionio.com>
Tue, 12 Jul 2011 21:49:16 +0000
(23:49 +0200)
committer
Jens Axboe
<jaxboe@fusionio.com>
Tue, 12 Jul 2011 21:49:16 +0000
(23:49 +0200)
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
os/os-netbsd.h
patch
|
blob
|
blame
|
history
diff --git
a/os/os-netbsd.h
b/os/os-netbsd.h
index 8f61ec549aa83cc65e037ef3e4299f1f61c547e8..7f5f48466b3f9ab8c9c4552160592b542f7cdc49 100644
(file)
--- a/
os/os-netbsd.h
+++ b/
os/os-netbsd.h
@@
-19,6
+19,7
@@
#define FIO_HAVE_FDATASYNC
#define FIO_USE_GENERIC_BDEV_SIZE
#define FIO_USE_GENERIC_RAND
+#define FIO_HAVE_GETTID
#undef FIO_HAVE_CPU_AFFINITY /* XXX notyet */
@@
-45,6
+46,14
@@
static inline unsigned long long os_phys_mem(void)
return mem;
}
+static inline int gettid(void)
+{
+ long lwpid;
+
+ thr_self(&lwpid);
+ return (int) lwpid;
+}
+
#ifdef MADV_FREE
#define FIO_MADV_FREE MADV_FREE
#endif