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

Commit dde984b2 authored by Ady Abraham's avatar Ady Abraham
Browse files

SF: fix threads name

Some of SF's threads are using a too long name which cause
pthread_setname_np to fail.

Fixes: 183128214
Test: systrace
Change-Id: I473342857bfa0642f99c8910020114ae37559cbb
parent bb100afd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ private:
    /* ------------------------------------------------------------------------
     * Threading
     */
    const char* const mThreadName = "RenderEngineThread";
    const char* const mThreadName = "RenderEngine";
    // Protects the creation and destruction of mThread.
    mutable std::mutex mThreadMutex;
    std::thread mThread GUARDED_BY(mThreadMutex);
+2 −2
Original line number Diff line number Diff line
@@ -176,7 +176,7 @@ RegionSamplingThread::RegionSamplingThread(SurfaceFlinger& flinger, Scheduler& s
        mScheduler(scheduler),
        mTunables(tunables),
        mIdleTimer(
                "RegionSamplingIdleTimer",
                "RegSampIdle",
                std::chrono::duration_cast<std::chrono::milliseconds>(
                        mTunables.mSamplingTimerTimeout),
                [] {}, [this] { checkForStaleLuma(); }),
@@ -184,7 +184,7 @@ RegionSamplingThread::RegionSamplingThread(SurfaceFlinger& flinger, Scheduler& s
                                                                tunables.mSamplingDuration)),
        lastSampleTime(0ns) {
    mThread = std::thread([this]() { threadMain(); });
    pthread_setname_np(mThread.native_handle(), "RegionSamplingThread");
    pthread_setname_np(mThread.native_handle(), "RegionSampling");
    mIdleTimer.start();
}