summaryrefslogtreecommitdiff
path: root/libs/binder/ProcessState.cpp
diff options
context:
space:
mode:
author Sebastian Pickl <spickl@google.com> 2023-10-30 11:28:23 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-10-30 11:28:23 +0000
commit271bd23714c8f90bf46398843141dfd29a59d125 (patch)
tree47483af2f39a1ff2d26442658ff43f0de44c70ac /libs/binder/ProcessState.cpp
parent9636af27d208552aa679437cbf3e292a6033a23d (diff)
parent25c1a3b8543dd1756308424dd65030f90bb7a99f (diff)
Merge changes from topic "revert-2780893-XRITMVSTFB" into main
* changes: Revert "Use std::unique_ptr instead of ScopeGuard" Revert "Use std::function instead of base::function_ref"
Diffstat (limited to 'libs/binder/ProcessState.cpp')
-rw-r--r--libs/binder/ProcessState.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index ff8aa83070..8ec4af9945 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -19,9 +19,9 @@
#include <binder/ProcessState.h>
#include <android-base/result.h>
+#include <android-base/scopeguard.h>
#include <android-base/strings.h>
#include <binder/BpBinder.h>
-#include <binder/Functional.h>
#include <binder/IPCThreadState.h>
#include <binder/IServiceManager.h>
#include <binder/Stability.h>
@@ -60,8 +60,6 @@ const char* kDefaultDriver = "/dev/binder";
namespace android {
-using namespace android::binder::impl;
-
class PoolThread : public Thread
{
public:
@@ -432,7 +430,7 @@ status_t ProcessState::setThreadPoolMaxThreadCount(size_t maxThreads) {
size_t ProcessState::getThreadPoolMaxTotalThreadCount() const {
pthread_mutex_lock(&mThreadCountLock);
- auto detachGuard = make_scope_guard([&]() { pthread_mutex_unlock(&mThreadCountLock); });
+ base::ScopeGuard detachGuard = [&]() { pthread_mutex_unlock(&mThreadCountLock); };
if (mThreadPoolStarted) {
LOG_ALWAYS_FATAL_IF(mKernelStartedThreads > mMaxThreads + 1,