summaryrefslogtreecommitdiffstats
path: root/vm/Thread.c
diff options
context:
space:
mode:
authorSan Mehat <san@google.com>2009-06-26 08:36:16 -0700
committerSan Mehat <san@google.com>2009-06-26 11:10:58 -0700
commit3e371e2ebbeeefe176ba1357e6ff241bd13a711e (patch)
tree740648d059731a923f859702670ad9bca8c93eb3 /vm/Thread.c
parent7d8220a4d0193b85efd7d289cbff3617f56ef0a9 (diff)
downloadandroid_dalvik-3e371e2ebbeeefe176ba1357e6ff241bd13a711e.tar.gz
android_dalvik-3e371e2ebbeeefe176ba1357e6ff241bd13a711e.tar.bz2
android_dalvik-3e371e2ebbeeefe176ba1357e6ff241bd13a711e.zip
dalvik: thread: Set the control group of a thread to the background group
if the priority is logically-lower than ANDROID_PRIORITY_BACKGROUND Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'vm/Thread.c')
-rw-r--r--vm/Thread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm/Thread.c b/vm/Thread.c
index acfc7a9df..0adde3878 100644
--- a/vm/Thread.c
+++ b/vm/Thread.c
@@ -2819,9 +2819,9 @@ void dvmChangeThreadPriority(Thread* thread, int newPriority)
}
newNice = kNiceValues[newPriority-1];
- if (newPriority == ANDROID_PRIORITY_BACKGROUND) {
+ if (newPriority >= ANDROID_PRIORITY_BACKGROUND) {
dvmChangeThreadSchedulerGroup("bg_non_interactive");
- } else if (getpriority(PRIO_PROCESS, pid) == ANDROID_PRIORITY_BACKGROUND) {
+ } else if (getpriority(PRIO_PROCESS, pid) >= ANDROID_PRIORITY_BACKGROUND) {
dvmChangeThreadSchedulerGroup(NULL);
}