diff options
| author | Wei Wang <wvw@google.com> | 2017-03-28 11:13:51 -0700 |
|---|---|---|
| committer | Wei Wang <wvw@google.com> | 2017-03-28 13:01:20 -0700 |
| commit | a8d59faa753c027e7375067f96a30e6429178105 (patch) | |
| tree | 6ba6eacea784bd8f52febc1a94b32da37e5ac608 /libcutils/sched_policy.cpp | |
| parent | 6105dbd01bfd88d64d5c5451f6570f146c8b91b8 (diff) | |
| download | system_core-a8d59faa753c027e7375067f96a30e6429178105.tar.gz system_core-a8d59faa753c027e7375067f96a30e6429178105.tar.bz2 system_core-a8d59faa753c027e7375067f96a30e6429178105.zip | |
libcutils: remove sched_set/getscheduler
Bug: 36667354
Test: angler taking video
Change-Id: Ie7fbcccbd02314468c03317319574ee7e433561d
Diffstat (limited to 'libcutils/sched_policy.cpp')
| -rw-r--r-- | libcutils/sched_policy.cpp | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/libcutils/sched_policy.cpp b/libcutils/sched_policy.cpp index 0d459cce1..73ca5180e 100644 --- a/libcutils/sched_policy.cpp +++ b/libcutils/sched_policy.cpp @@ -271,17 +271,9 @@ int get_sched_policy(int tid, SchedPolicy *policy) return -1; } } else { - int rc = sched_getscheduler(tid); - if (rc < 0) - return -1; - else if (rc == SCHED_NORMAL) - *policy = SP_FOREGROUND; - else if (rc == SCHED_BATCH) - *policy = SP_BACKGROUND; - else { - errno = ERANGE; - return -1; - } + // In b/34193533, we removed bg_non_interactive cgroup, so now + // all threads are in FOREGROUND cgroup + *policy = SP_FOREGROUND; } return 0; } @@ -428,14 +420,6 @@ int set_sched_policy(int tid, SchedPolicy policy) return -errno; } - } else { - struct sched_param param; - - param.sched_priority = 0; - sched_setscheduler(tid, - (policy == SP_BACKGROUND) ? - SCHED_BATCH : SCHED_NORMAL, - ¶m); } if (__sys_supports_timerslack) { |
