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

Commit 47d55173 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Add comments explaining about SCHED_FIFO

Test: builds OK
Change-Id: I7fa39defb081c27eb32abb241c0aa2a210744954
parent d0ebc4ce
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -1414,6 +1414,9 @@ status_t AudioTrack::createTrack_l()


    pid_t tid = -1;
    pid_t tid = -1;
    if (mFlags & AUDIO_OUTPUT_FLAG_FAST) {
    if (mFlags & AUDIO_OUTPUT_FLAG_FAST) {
        // It is currently meaningless to request SCHED_FIFO for a Java thread.  Even if the
        // application-level code follows all non-blocking design rules, the language runtime
        // doesn't also follow those rules, so the thread will not benefit overall.
        if (mAudioTrackThread != 0 && !mThreadCanCallJava) {
        if (mAudioTrackThread != 0 && !mThreadCanCallJava) {
            tid = mAudioTrackThread->getTid();
            tid = mAudioTrackThread->getTid();
        }
        }
@@ -2948,6 +2951,7 @@ bool AudioTrack::AudioTrackThread::threadLoop()
            mPausedInt = false;
            mPausedInt = false;
        }
        }
        if (mPausedInt) {
        if (mPausedInt) {
            // TODO use futex instead of condition, for event flag "or"
            if (mPausedNs > 0) {
            if (mPausedNs > 0) {
                (void) mMyCond.waitRelative(mMyLock, mPausedNs);
                (void) mMyCond.waitRelative(mMyLock, mPausedNs);
            } else {
            } else {