libcutils: remove sched_set/getscheduler
Bug: 36667354
Test: angler taking video
Change-Id: Ic077d856212c48610a0587c60d1186090166da2b
(cherry-picked from a8d59faa75
)
This commit is contained in:
parent
94f3ca8776
commit
bc41166d56
1 changed files with 3 additions and 19 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue