Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0cf055dc authored by Jorim Jaggi's avatar Jorim Jaggi Committed by android-build-merger
Browse files

Merge "Fix thread booster" into oc-dev am: 4c1209e0 am: 2bdff7d6

am: 3ee99d75

Change-Id: Iff38c8efc74c821ed473f50850720e6313244296
parents 495b9e8f 3ee99d75
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -43,10 +43,12 @@ public class ThreadPriorityBooster {
        final int tid = myTid();
        final int prevPriority = getThreadPriority(tid);
        final PriorityState state = mThreadState.get();
        if (state.regionCounter == 0) {
            state.prevPriority = prevPriority;
        if (state.regionCounter == 0 && prevPriority > mBoostToPriority) {
            if (prevPriority > mBoostToPriority) {
                setThreadPriority(tid, mBoostToPriority);
            }
        }
        state.regionCounter++;
        if (LockGuard.ENABLED) {
            LockGuard.guard(mLockGuardIndex);