diff options
author | Glenn Kasten <gkasten@google.com> | 2012-04-22 11:41:24 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-04-22 11:41:24 -0700 |
commit | de930063061d26816bab083f88d7c92c5eba4ef8 (patch) | |
tree | 0f79abac413e02bced067739ffbf435903a20ef4 /include | |
parent | 92e6c88265e0126b6d9a205498bb1c62efc05509 (diff) | |
parent | 69bfb1f099164ae7ba44b5d0f7ba7c47cbbafd4d (diff) | |
download | system_core-de930063061d26816bab083f88d7c92c5eba4ef8.zip system_core-de930063061d26816bab083f88d7c92c5eba4ef8.tar.gz system_core-de930063061d26816bab083f88d7c92c5eba4ef8.tar.bz2 |
Merge "Scheduling group cleanup - add comment, SP_DEFAULT"
Diffstat (limited to 'include')
-rw-r--r-- | include/cutils/sched_policy.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/cutils/sched_policy.h b/include/cutils/sched_policy.h index 753a08c..c6e4fc4 100644 --- a/include/cutils/sched_policy.h +++ b/include/cutils/sched_policy.h @@ -21,21 +21,26 @@ extern "C" { #endif +/* Keep in sync with THREAD_GROUP_* in frameworks/base/core/java/android/os/Process.java */ typedef enum { + SP_DEFAULT = -1, SP_BACKGROUND = 0, SP_FOREGROUND = 1, SP_CNT, SP_MAX = SP_CNT - 1, + SP_SYSTEM_DEFAULT = SP_FOREGROUND, } SchedPolicy; /* Assign thread tid to the cgroup associated with the specified policy. * If the thread is a thread group leader, that is it's gettid() == getpid(), * then the other threads in the same thread group are _not_ affected. + * On platforms which support gettid(), zero tid means current thread. * Return value: 0 for success, or -errno for error. */ extern int set_sched_policy(int tid, SchedPolicy policy); /* Return the policy associated with the cgroup of thread tid via policy pointer. + * On platforms which support gettid(), zero tid means current thread. * Return value: 0 for success, or -1 for error and set errno. */ extern int get_sched_policy(int tid, SchedPolicy *policy); |