summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2021-12-17 00:57:43 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2021-12-17 00:57:43 +0000
commit9d704cf3d6f6b9427d203e04db3d761d8b454b54 (patch)
treeebc4eff3fb50b2b06c29a70b34b58e60e87d0b61
parent0fd35189c51757a06c984a11978ef2f96ac9608b (diff)
parent9f2837e299a1f15ca69fa3c8754931c810b0b8e9 (diff)
Merge "libbinder: log when wrong number of threads start" am: 88c016949a am: 7cd700ee55 am: 9f2837e299
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1925163 Change-Id: Id886ac4bc291972cbcfcd49e53f1c437e23adc9c
-rw-r--r--libs/binder/ProcessState.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index 4f21cda4a1..9abe4b50bc 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -176,6 +176,11 @@ void ProcessState::startThreadPool()
{
AutoMutex _l(mLock);
if (!mThreadPoolStarted) {
+ if (mMaxThreads == 0) {
+ ALOGW("Extra binder thread started, but 0 threads requested. Do not use "
+ "*startThreadPool when zero threads are requested.");
+ }
+
mThreadPoolStarted = true;
spawnPooledThread(true);
}