include: linux: Export santized ioprio header
Export sanitized ioprio.h for userspace.
Change-Id: Ifec6bc6b539c84fcba27751d4ac0de03458cd131
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 9a7081d..06772d9 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -207,6 +207,7 @@
header-y += input.h
header-y += ioctl.h
header-y += ion.h
+header-y += ioprio.h
header-y += ip.h
header-y += ip6_tunnel.h
header-y += ip_vs.h
diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h
index 76dad48..da6e8c5 100644
--- a/include/linux/ioprio.h
+++ b/include/linux/ioprio.h
@@ -1,14 +1,16 @@
#ifndef IOPRIO_H
#define IOPRIO_H
-
+#ifdef __KERNEL__
#include <linux/sched.h>
#include <linux/iocontext.h>
+#endif /* __KERNEL__ */
/*
* Gives us 8 prio classes with 13-bits of data for each class
*/
#define IOPRIO_BITS (16)
#define IOPRIO_CLASS_SHIFT (13)
+#ifdef __KERNEL__
#define IOPRIO_PRIO_MASK ((1UL << IOPRIO_CLASS_SHIFT) - 1)
#define IOPRIO_PRIO_CLASS(mask) ((mask) >> IOPRIO_CLASS_SHIFT)
@@ -16,6 +18,7 @@
#define IOPRIO_PRIO_VALUE(class, data) (((class) << IOPRIO_CLASS_SHIFT) | data)
#define ioprio_valid(mask) (IOPRIO_PRIO_CLASS((mask)) != IOPRIO_CLASS_NONE)
+#endif /* __KERNEL__ */
/*
* These are the io priority groups as implemented by CFQ. RT is the realtime
@@ -41,6 +44,7 @@
IOPRIO_WHO_USER,
};
+#ifdef __KERNEL__
/*
* if process has set io priority explicitly, use that. if not, convert
* the cpu scheduler nice value to an io priority
@@ -88,4 +92,5 @@
extern int set_task_ioprio(struct task_struct *task, int ioprio);
-#endif
+#endif /* __KERNEL__ */
+#endif /* IOPRIO_H */