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

Commit 53b46d0b authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Reland "Disallow shrinking threadpool size once started."" am:...

Merge "Reland "Disallow shrinking threadpool size once started."" am: 0d4dfb1c am: 833b6bd5 am: 1ee1f204 am: 00333651 am: e607d3e3

Change-Id: I0924fe3c4f2c363491c7cfaf71ce8bbe47fe5182
parents 02493699 e607d3e3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -328,6 +328,8 @@ void ProcessState::spawnPooledThread(bool isMain)
}

status_t ProcessState::setThreadPoolMaxThreadCount(size_t maxThreads) {
    LOG_ALWAYS_FATAL_IF(mThreadPoolStarted && maxThreads < mMaxThreads,
           "Binder threadpool cannot be shrunk after starting");
    status_t result = NO_ERROR;
    if (ioctl(mDriverFD, BINDER_SET_MAX_THREADS, &maxThreads) != -1) {
        mMaxThreads = maxThreads;