diff options
author | Elliott Hughes <enh@google.com> | 2016-04-29 18:04:20 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2016-04-30 20:15:51 -0500 |
commit | e0dbc6beaf376f1a84464e103661840178576b84 (patch) | |
tree | 0c79b2cccfc2854a5cca318a95e7c053c7825002 /lib/portability.h | |
parent | ec863082bfef526d0a02ab6823c967fbaba5dd74 (diff) | |
download | toybox-e0dbc6beaf376f1a84464e103661840178576b84.tar.gz |
Add a ps "PCY" field for Android scheduling policy.
Diffstat (limited to 'lib/portability.h')
-rw-r--r-- | lib/portability.h | 7 |
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 |