diff options
author | 2020-03-09 20:22:18 +0000 | |
---|---|---|
committer | 2020-03-09 20:22:18 +0000 | |
commit | 1ee1f20424d89928cf65f32c0af80620c66dc0c3 (patch) | |
tree | 9affcd68ca1602fabf86b9792d1762df74c2afe0 /libs/binder/ProcessState.cpp | |
parent | 0b91451ee6df407f2ecc0ff72fc3a0b3c5d9ae18 (diff) | |
parent | 833b6bd5df1f466bdabfb4f966128a1a6c234438 (diff) |
Merge "Reland "Disallow shrinking threadpool size once started."" am: 0d4dfb1c9b am: 833b6bd5df
Change-Id: Ic18e54170e4ded7873376943aabb2d87f094945c
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 4b773e816f..f3861bb2b5 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; |