Skip to content
Snippets Groups Projects
Commit 1fb6e24f authored by Todd Kjos's avatar Todd Kjos Committed by Android (Google) Code Review
Browse files

Merge "Fix janky navbar ripples -- incorrect timerslack values" into mnc-dev

parents 1eb38187 4cdce427
No related branches found
No related tags found
No related merge requests found
...@@ -50,6 +50,7 @@ static inline SchedPolicy _policy(SchedPolicy p) ...@@ -50,6 +50,7 @@ static inline SchedPolicy _policy(SchedPolicy p)
// timer slack value in nS enforced when the thread moves to background // timer slack value in nS enforced when the thread moves to background
#define TIMER_SLACK_BG 40000000 #define TIMER_SLACK_BG 40000000
#define TIMER_SLACK_FG 50000
static pthread_once_t the_once = PTHREAD_ONCE_INIT; static pthread_once_t the_once = PTHREAD_ONCE_INIT;
...@@ -353,7 +354,8 @@ int set_sched_policy(int tid, SchedPolicy policy) ...@@ -353,7 +354,8 @@ int set_sched_policy(int tid, SchedPolicy policy)
&param); &param);
} }
prctl(PR_SET_TIMERSLACK_PID, policy == SP_BACKGROUND ? TIMER_SLACK_BG : 0, tid); prctl(PR_SET_TIMERSLACK_PID,
policy == SP_BACKGROUND ? TIMER_SLACK_BG : TIMER_SLACK_FG, tid);
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment