summaryrefslogtreecommitdiff
path: root/libutils/Threads.cpp
diff options
context:
space:
mode:
authoralk3pInjection <webmaster@raspii.tech>2022-01-20 22:04:36 +0800
committeralk3pInjection <webmaster@raspii.tech>2022-01-20 22:04:36 +0800
commitc711763ced44cb54557027c44c57262cbaa60048 (patch)
tree738fb6f071410f704e600342e27c56b66f529a69 /libutils/Threads.cpp
parentd7454623bf74985633db4656f355e7b2951b6365 (diff)
parent4021851b95b6d6561cdd4f7ff54abd93a12ebcac (diff)
Merge tag 'LA.QSSI.12.0.r1-05800-qssi.0' into sugisawa
"LA.QSSI.12.0.r1-05800-qssi.0" Change-Id: I057db3543fad7cab3fbda5a5ac742c92b2e2b3c5
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.