Fix missing fio_set_sched_idle declaration.
I still haven't worked out what's going on here (specifically: how did
this link without a definition), but the easy fix is to just copy the
code from the os-linux.h header.
Change-Id: I9a64fd14d83116c26daf341e6acbd571ea207026
diff --git a/Android.mk b/Android.mk
index ba63658..54e1c56 100644
--- a/Android.mk
+++ b/Android.mk
@@ -56,8 +56,6 @@
LOCAL_SHARED_LIBRARIES := libdl
LOCAL_STATIC_LIBRARIES := libcutils libz
-LOCAL_C_INCLUDES += external/zlib
-
LOCAL_LDLIBS += -ldl
LOCAL_CFLAGS += -DFIO_VERSION="\"fio-2.1.8-80-g890b\"" \
-DCONFIG_3ARG_AFFINITY \
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 @@
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