Flexible I/O Tester development
 help / color / mirror / Atom feed
* [PATCH] netbsd: fix gettid
@ 2012-09-26  9:13 Roger Pau Monne
  2012-09-26 10:43 ` Jens Axboe
  0 siblings, 1 reply; 4+ messages in thread
From: Roger Pau Monne @ 2012-09-26  9:13 UTC (permalink / raw)
  To: fio; +Cc: Roger Pau Monne

Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
---
 os/os-netbsd.h |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/os/os-netbsd.h b/os/os-netbsd.h
index aef578e..de687ba 100644
--- a/os/os-netbsd.h
+++ b/os/os-netbsd.h
@@ -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
@@ -63,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
-- 
1.7.7.5 (Apple Git-26)


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-09-26 10:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-26  9:13 [PATCH] netbsd: fix gettid Roger Pau Monne
2012-09-26 10:43 ` Jens Axboe
2012-09-26 10:49   ` Roger Pau Monne
2012-09-26 10:50     ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox