aboutsummaryrefslogtreecommitdiff
path: root/lib/portability.h
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2016-04-29 18:04:20 -0700
committerRob Landley <rob@landley.net>2016-04-30 20:15:51 -0500
commite0dbc6beaf376f1a84464e103661840178576b84 (patch)
tree0c79b2cccfc2854a5cca318a95e7c053c7825002 /lib/portability.h
parentec863082bfef526d0a02ab6823c967fbaba5dd74 (diff)
downloadtoybox-e0dbc6beaf376f1a84464e103661840178576b84.tar.gz
Add a ps "PCY" field for Android scheduling policy.
Diffstat (limited to 'lib/portability.h')
-rw-r--r--lib/portability.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/portability.h b/lib/portability.h
index fdee5fcf..87258fa9 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -270,3 +270,10 @@ pid_t xfork(void);
//#define strncpy(...) @@strncpyisbadmmkay@@
//#define strncat(...) @@strncatisbadmmkay@@
+#ifdef __ANDROID__
+#include <cutils/sched_policy.h>
+#else
+typedef int SchedPolicy;
+int get_sched_policy(int tid, SchedPolicy *policy);
+const char *get_sched_policy_name(SchedPolicy policy);
+#endif