summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSan Mehat <san@google.com>2009-04-21 14:06:36 -0700
committerSan Mehat <san@google.com>2009-04-27 09:17:06 -0700
commite9d376b801b7890b1ef5006ed55de4208e64bb63 (patch)
tree9c4840944aeaccfe4c9eaf6a72a164af38f17ed1 /include
parent03a54faa454381e8d67fe11b1be2b2d54f3894c6 (diff)
downloadframeworks_base-e9d376b801b7890b1ef5006ed55de4208e64bb63.zip
frameworks_base-e9d376b801b7890b1ef5006ed55de4208e64bb63.tar.gz
frameworks_base-e9d376b801b7890b1ef5006ed55de4208e64bb63.tar.bz2
Add support for changing a threads scheduler group. Three groups are available (default, background non interactive, foreground boost). Setting a thread priority to PRIORITY_BACKGROUND will transparently change groups to background
Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/utils/threads.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/utils/threads.h b/include/utils/threads.h
index 8d8d46a..b320915 100644
--- a/include/utils/threads.h
+++ b/include/utils/threads.h
@@ -79,6 +79,13 @@ enum {
ANDROID_PRIORITY_LESS_FAVORABLE = +1,
};
+enum {
+ ANDROID_TGROUP_DEFAULT = 0,
+ ANDROID_TGROUP_BG_NONINTERACT = 1,
+ ANDROID_TGROUP_FG_BOOST = 2,
+ ANDROID_TGROUP_MAX = ANDROID_TGROUP_FG_BOOST,
+};
+
// Create and run a new thread.
extern int androidCreateThread(android_thread_func_t, void *);