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

Commit 6d0760de authored by Glenn Kasten's avatar Glenn Kasten Committed by Android (Google) Code Review
Browse files

Merge "sched_getscheduler may include SCHED_RESET_ON_FORK" into nyc-dr1-dev

parents 23b98e35 8255ba7b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -924,7 +924,7 @@ nsecs_t AudioRecord::processAudioBuffer()
        int32_t tryCounter = kMaxTries;
        int32_t tryCounter = kMaxTries;
        uint32_t pollUs = 10000;
        uint32_t pollUs = 10000;
        do {
        do {
            int policy = sched_getscheduler(0);
            int policy = sched_getscheduler(0) & ~SCHED_RESET_ON_FORK;
            if (policy == SCHED_FIFO || policy == SCHED_RR) {
            if (policy == SCHED_FIFO || policy == SCHED_RR) {
                break;
                break;
            }
            }
+1 −1
Original line number Original line Diff line number Diff line
@@ -1777,7 +1777,7 @@ nsecs_t AudioTrack::processAudioBuffer()
        int32_t tryCounter = kMaxTries;
        int32_t tryCounter = kMaxTries;
        uint32_t pollUs = 10000;
        uint32_t pollUs = 10000;
        do {
        do {
            int policy = sched_getscheduler(0);
            int policy = sched_getscheduler(0) & ~SCHED_RESET_ON_FORK;
            if (policy == SCHED_FIFO || policy == SCHED_RR) {
            if (policy == SCHED_FIFO || policy == SCHED_RR) {
                break;
                break;
            }
            }
+1 −1
Original line number Original line Diff line number Diff line
@@ -167,7 +167,7 @@ bool FastThread::threadLoop()
                if (old <= 0) {
                if (old <= 0) {
                    syscall(__NR_futex, coldFutexAddr, FUTEX_WAIT_PRIVATE, old - 1, NULL);
                    syscall(__NR_futex, coldFutexAddr, FUTEX_WAIT_PRIVATE, old - 1, NULL);
                }
                }
                int policy = sched_getscheduler(0);
                int policy = sched_getscheduler(0) & ~SCHED_RESET_ON_FORK;
                if (!(policy == SCHED_FIFO || policy == SCHED_RR)) {
                if (!(policy == SCHED_FIFO || policy == SCHED_RR)) {
                    ALOGE("did not receive expected priority boost");
                    ALOGE("did not receive expected priority boost");
                }
                }