binder: Add an API to check if the threadpool has been started
Libraries that require the threadpool can check this to make sure the
threadpool has been started before it is needed.
Test: atest binderLibTest
Bug: 261652496
Change-Id: I7505319f162e2789dcc3c41bf1f7535c5c1bb9d9
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index 1f311ac..254dda8 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -439,6 +439,10 @@
return mCurrentThreads;
}
+bool ProcessState::isThreadPoolStarted() const {
+ return mThreadPoolStarted;
+}
+
#define DRIVER_FEATURES_PATH "/dev/binderfs/features/"
bool ProcessState::isDriverFeatureEnabled(const DriverFeature feature) {
static const char* const names[] = {