Merge "libutils: don't call SetTaskProfiles around priority" am: 82b74d6f15
am: 5d078b5903
am: 15af4f4bf8
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1975808 Change-Id: I2d4fa7f1821140d305016b181d5f6bdf7967b974
This commit is contained in:
commit
14f3fb79e2
1 changed files with 0 additions and 14 deletions
|
@ -84,14 +84,6 @@ struct thread_data_t {
|
|||
delete t;
|
||||
setpriority(PRIO_PROCESS, 0, prio);
|
||||
|
||||
// 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_SYSTEM"}, true);
|
||||
}
|
||||
|
||||
if (name) {
|
||||
androidSetThreadName(name);
|
||||
free(name);
|
||||
|
@ -314,12 +306,6 @@ int androidSetThreadPriority(pid_t tid, int pri)
|
|||
return rc;
|
||||
}
|
||||
|
||||
if (pri >= ANDROID_PRIORITY_BACKGROUND) {
|
||||
rc = SetTaskProfiles(tid, {"SCHED_SP_SYSTEM"}, true) ? 0 : -1;
|
||||
} else if (curr_pri >= ANDROID_PRIORITY_BACKGROUND) {
|
||||
rc = SetTaskProfiles(tid, {"SCHED_SP_FOREGROUND"}, true) ? 0 : -1;
|
||||
}
|
||||
|
||||
if (rc) {
|
||||
lasterr = errno;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue