diff options
author | Eric Arseneau <earseneau@google.com> | 2021-12-19 22:49:38 -0800 |
---|---|---|
committer | Eric Arseneau <earseneau@google.com> | 2021-12-19 22:49:38 -0800 |
commit | 0095bebba6a5574aa0abafbc63ac0ca2a6f85080 (patch) | |
tree | 893505a763a8280b4627ce8132d7039a911e6304 /libutils/Threads.cpp | |
parent | 8bbd5d47b44e88701b5d537bd6c53c9a44878d0f (diff) | |
parent | 2237faaae790ca8b751ea5d47056528c0c7f1892 (diff) |
Merge s-mpr-2021-12-05
Change-Id: Id04e29c2e6639a50d8ad7accc675e03d38f50b6c
Diffstat (limited to 'libutils/Threads.cpp')
-rw-r--r-- | libutils/Threads.cpp | 6 |
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. |