diff options
| author | San Mehat <san@google.com> | 2009-06-26 08:36:16 -0700 |
|---|---|---|
| committer | San Mehat <san@google.com> | 2009-06-26 11:10:58 -0700 |
| commit | 3e371e2ebbeeefe176ba1357e6ff241bd13a711e (patch) | |
| tree | 740648d059731a923f859702670ad9bca8c93eb3 /vm/alloc/Heap.c | |
| parent | 7d8220a4d0193b85efd7d289cbff3617f56ef0a9 (diff) | |
| download | android_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/alloc/Heap.c')
| -rw-r--r-- | vm/alloc/Heap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vm/alloc/Heap.c b/vm/alloc/Heap.c index 09954ea8b..e58a8a8c8 100644 --- a/vm/alloc/Heap.c +++ b/vm/alloc/Heap.c @@ -775,7 +775,7 @@ void dvmCollectGarbageInternal(bool collectSoftReferences) * in backward UNIX terms means lower priority. */ - if (priorityResult == ANDROID_PRIORITY_BACKGROUND) { + if (priorityResult >= ANDROID_PRIORITY_BACKGROUND) { dvmChangeThreadSchedulerGroup(NULL); } @@ -1025,7 +1025,7 @@ void dvmCollectGarbageInternal(bool collectSoftReferences) LOGD_HEAP("Reset priority to %d\n", oldThreadPriority); } - if (oldThreadPriority == ANDROID_PRIORITY_BACKGROUND) { + if (oldThreadPriority >= ANDROID_PRIORITY_BACKGROUND) { dvmChangeThreadSchedulerGroup("bg_non_interactive"); } } |
