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

Commit 6b004951 authored by Tim Murray's avatar Tim Murray Committed by Zhao Wei Liew
Browse files

Fix incorrect FIFO cgroup assignment.

bug 33745094
Test: builds

Change-Id: I46eefc8ea6f17ca3795f4743692ddfea36d5db0f
parent 7a9053ac
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -241,7 +241,7 @@ void android_os_Process_setProcessGroup(JNIEnv* env, jobject clazz, int pid, jin
        t_pri = getpriority(PRIO_PROCESS, t_pid);
        t_pri = getpriority(PRIO_PROCESS, t_pid);


        if (t_pri <= ANDROID_PRIORITY_AUDIO) {
        if (t_pri <= ANDROID_PRIORITY_AUDIO) {
            int scheduler = sched_getscheduler(t_pid);
            int scheduler = sched_getscheduler(t_pid) & ~SCHED_RESET_ON_FORK;
            if ((scheduler == SCHED_FIFO) || (scheduler == SCHED_RR)) {
            if ((scheduler == SCHED_FIFO) || (scheduler == SCHED_RR)) {
                // This task wants to stay in its current audio group so it can keep its budget
                // This task wants to stay in its current audio group so it can keep its budget
                // don't update its cpuset or cgroup
                // don't update its cpuset or cgroup