diff options
author | Wei Wang <wvw@google.com> | 2021-12-13 18:02:28 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-12-13 18:02:28 +0000 |
commit | a2c0b86ad006876199a9b97c23958e54de7e869e (patch) | |
tree | 73cee9b6c46152166b0d4af3d2a855845ac4bfc8 /libutils/Threads.cpp | |
parent | d1dbabbd4e33a80c65d34ea85ca50e636388d444 (diff) | |
parent | d2b270c06301e70ed0b3624fb2d0d439fdc2559c (diff) |
Merge "libutils: do not follow process's group" into sc-v2-dev
Diffstat (limited to 'libutils/Threads.cpp')
-rw-r--r-- | libutils/Threads.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libutils/Threads.cpp b/libutils/Threads.cpp index 6e293c741..3bf577961 100644 --- a/libutils/Threads.cpp +++ b/libutils/Threads.cpp @@ -317,10 +317,7 @@ int androidSetThreadPriority(pid_t tid, int pri) if (pri >= ANDROID_PRIORITY_BACKGROUND) { 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. - get_sched_policy(getpid(), &policy); - rc = SetTaskProfiles(tid, {get_sched_policy_profile_name(policy)}, true) ? 0 : -1; + rc = SetTaskProfiles(tid, {"SCHED_SP_FOREGROUND"}, true) ? 0 : -1; } if (rc) { |