diff options
| author | 2020-03-04 17:08:46 +0000 | |
|---|---|---|
| committer | 2020-03-04 17:08:46 +0000 | |
| commit | 9ee812fdc9054fba948a42cb2f1cbf2361d38e89 (patch) | |
| tree | f69e81b3b8696efd7d7a989b57218a30aa15d931 /libs/binder/ProcessState.cpp | |
| parent | 2b3ad23b0c1579d248cfff9730dea7e03248da2a (diff) | |
| parent | 70f592a6cf9a63cdf1b01274a4430b2de1505af9 (diff) | |
Merge "Disallow shrinking threadpool size once started." am: 70f592a6cf
Change-Id: I50c7b0aba4d22a08de0b78775c2c352e92bbbb95
Diffstat (limited to 'libs/binder/ProcessState.cpp')
| -rw-r--r-- | libs/binder/ProcessState.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp index 631e8c5cb2..0f81e0bef0 100644 --- a/libs/binder/ProcessState.cpp +++ b/libs/binder/ProcessState.cpp @@ -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; |