Flexible I/O Tester development
 help / color / mirror / Atom feed
* [PATCH] Replace FIO_HAVE_RUSAGE_THREAD with RUSAGE_THREAD
@ 2012-10-23  1:29 Yufei Ren
  2012-10-23  1:29 ` [PATCH] rdma ioengine improvement Yufei Ren
  2012-10-24  6:29 ` [PATCH] Replace FIO_HAVE_RUSAGE_THREAD with RUSAGE_THREAD Jens Axboe
  0 siblings, 2 replies; 4+ messages in thread
From: Yufei Ren @ 2012-10-23  1:29 UTC (permalink / raw)
  To: fio; +Cc: Yufei Ren

From: Yufei Ren <renyufei83@gmail.com>

RUSAGE_THREAD is a more clear macro to enable getrusage() thread support.
---
 os/os-linux.h |    5 -----
 stat.c        |    2 +-
 2 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/os/os-linux.h b/os/os-linux.h
index 2b35f34..9b7ff29 100644
--- a/os/os-linux.h
+++ b/os/os-linux.h
@@ -14,7 +14,6 @@
 #include <linux/unistd.h>
 #include <linux/raw.h>
 #include <linux/major.h>
-#include <linux/version.h>
 #include <endian.h>
 
 #include "indirect.h"
@@ -63,10 +62,6 @@
 #define FIO_HAVE_FALLOC_ENG
 #endif
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
-#define FIO_HAVE_RUSAGE_THREAD
-#endif
-
 #ifdef SYNC_FILE_RANGE_WAIT_BEFORE
 #define FIO_HAVE_SYNC_FILE_RANGE
 #endif
diff --git a/stat.c b/stat.c
index af6e1f2..522901a 100644
--- a/stat.c
+++ b/stat.c
@@ -16,7 +16,7 @@ void update_rusage_stat(struct thread_data *td)
 {
 	struct thread_stat *ts = &td->ts;
 
-#ifdef FIO_HAVE_RUSAGE_THREAD
+#ifdef RUSAGE_THREAD
 	getrusage(RUSAGE_THREAD, &td->ru_end);
 #else
 	getrusage(RUSAGE_SELF, &td->ru_end);
-- 
1.7.2.3


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

end of thread, other threads:[~2012-10-24  6:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-23  1:29 [PATCH] Replace FIO_HAVE_RUSAGE_THREAD with RUSAGE_THREAD Yufei Ren
2012-10-23  1:29 ` [PATCH] rdma ioengine improvement Yufei Ren
2012-10-24  6:37   ` Jens Axboe
2012-10-24  6:29 ` [PATCH] Replace FIO_HAVE_RUSAGE_THREAD with RUSAGE_THREAD Jens Axboe

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