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

Commit 21be43e1 authored by John Reck's avatar John Reck
Browse files

Fix hwuitask & RT priorities

 Bug: 15993695

Change-Id: Ib6f07237cb834e8d10f3074f8fb206d27f91859a
parent 9fde9a25
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -18,6 +18,9 @@

#include "RenderThread.h"

#if defined(HAVE_PTHREADS)
#include <sys/resource.h>
#endif
#include <gui/DisplayEventReceiver.h>
#include <utils/Log.h>

@@ -244,6 +247,9 @@ void RenderThread::requestVsync() {
}

bool RenderThread::threadLoop() {
#if defined(HAVE_PTHREADS)
    setpriority(PRIO_PROCESS, 0, PRIORITY_DISPLAY);
#endif
    initThreadLocals();

    int timeoutMillis = -1;
+10 −0
Original line number Diff line number Diff line
@@ -15,6 +15,9 @@
 */

#include <sys/sysinfo.h>
#if defined(HAVE_PTHREADS)
#include <sys/resource.h>
#endif

#include "TaskManager.h"
#include "Task.h"
@@ -79,6 +82,13 @@ bool TaskManager::addTaskBase(const sp<TaskBase>& task, const sp<TaskProcessorBa
// Thread
///////////////////////////////////////////////////////////////////////////////

status_t TaskManager::WorkerThread::readyToRun() {
#if defined(HAVE_PTHREADS)
    setpriority(PRIO_PROCESS, 0, PRIORITY_FOREGROUND);
#endif
    return NO_ERROR;
}

bool TaskManager::WorkerThread::threadLoop() {
    mSignal.wait();
    Vector<TaskWrapper> tasks;
+1 −0
Original line number Diff line number Diff line
@@ -84,6 +84,7 @@ private:
        void exit();

    private:
        virtual status_t readyToRun();
        virtual bool threadLoop();

        // Lock for the list of tasks