Flexible I/O Tester development
 help / color / mirror / Atom feed
* [PATCH] fix implicit function declaration on Android
@ 2015-02-20 19:00 enh
  2015-02-25 21:00 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: enh @ 2015-02-20 19:00 UTC (permalink / raw)
  To: fio

there's no fio_set_sched_idle in os/os-android.h. copy the one from
os/os-linux.h.

current Android also has posix_madvise.

diff --git a/os/os-android.h b/os/os-android.h
index c30f62e..6b074cd 100644
--- a/os/os-android.h
+++ b/os/os-android.h
@@ -4,6 +4,7 @@
 #define FIO_OS os_android

 #include <sys/ioctl.h>
+#include <sys/mman.h>
 #include <sys/uio.h>
 #include <sys/syscall.h>
 #include <sys/vfs.h>
@@ -37,10 +38,6 @@

 #define OS_MAP_ANON MAP_ANONYMOUS

-#define posix_madvise   madvise
-#define POSIX_MADV_DONTNEED MADV_DONTNEED
-#define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL
-#define POSIX_MADV_RANDOM MADV_RANDOM
 #ifdef MADV_REMOVE
 #define FIO_MADV_FREE MADV_REMOVE
 #endif
@@ -261,4 +258,12 @@ static inline int os_trim(int fd, unsigned long long start,
  return errno;
 }

+#ifdef CONFIG_SCHED_IDLE
+static inline int fio_set_sched_idle(void)
+{
+        struct sched_param p = { .sched_priority = 0, };
+        return sched_setscheduler(gettid(), SCHED_IDLE, &p);
+}
+#endif
+
 #endif

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

* Re: [PATCH] fix implicit function declaration on Android
  2015-02-20 19:00 [PATCH] fix implicit function declaration on Android enh
@ 2015-02-25 21:00 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2015-02-25 21:00 UTC (permalink / raw)
  To: enh, fio

On 02/20/2015 12:00 PM, enh wrote:
> there's no fio_set_sched_idle in os/os-android.h. copy the one from
> os/os-linux.h.
> 
> current Android also has posix_madvise.

Applied, thanks.

-- 
Jens Axboe



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

end of thread, other threads:[~2015-02-25 21:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-20 19:00 [PATCH] fix implicit function declaration on Android enh
2015-02-25 21:00 ` Jens Axboe

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