summaryrefslogtreecommitdiff
path: root/libutils/Threads.cpp
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-11-10 00:51:02 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-11-10 00:51:02 +0000
commit753d79a099a11621991aa350c1cccdb48adddbd5 (patch)
tree1ac1c96b026db1cfe77aa38ba49173a798f180c4 /libutils/Threads.cpp
parent7f0b69764cfb1b508a822d83d5df3d41c585dd1b (diff)
parent773bc40b522b752961a76128966380e054338328 (diff)
Snap for 7808903 from ecaf9ef70a151d85ad548f8c1d789f5e562f67a8 to sc-qpr1-release am: 773bc40b52
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/16021160 Change-Id: I31a210f7c74faf6ae1cbdcaad8ae5e22e74faabf
Diffstat (limited to 'libutils/Threads.cpp')
-rw-r--r--libutils/Threads.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libutils/Threads.cpp b/libutils/Threads.cpp
index 540dcf49d..6e293c741 100644
--- a/libutils/Threads.cpp
+++ b/libutils/Threads.cpp
@@ -86,8 +86,10 @@ struct thread_data_t {
// A new thread will be in its parent's sched group by default,
// so we just need to handle the background case.
+ // currently set to system_background group which is different
+ // from background group for app.
if (prio >= ANDROID_PRIORITY_BACKGROUND) {
- SetTaskProfiles(0, {"SCHED_SP_BACKGROUND"}, true);
+ SetTaskProfiles(0, {"SCHED_SP_SYSTEM"}, true);
}
if (name) {
@@ -313,7 +315,7 @@ int androidSetThreadPriority(pid_t tid, int pri)
}
if (pri >= ANDROID_PRIORITY_BACKGROUND) {
- rc = SetTaskProfiles(tid, {"SCHED_SP_BACKGROUND"}, true) ? 0 : -1;
+ rc = SetTaskProfiles(tid, {"SCHED_SP_SYSTEM"}, true) ? 0 : -1;
} else if (curr_pri >= ANDROID_PRIORITY_BACKGROUND) {
SchedPolicy policy = SP_FOREGROUND;
// Change to the sched policy group of the process.