From 1de48a256fa9f754d3171e90345cb6d2db25baba Mon Sep 17 00:00:00 2001 From: Tomasz Wasilczyk Date: Mon, 30 Oct 2023 14:19:19 +0000 Subject: Revert^2 "Use std::unique_ptr instead of ScopeGuard" 25c1a3b8543dd1756308424dd65030f90bb7a99f Test: m Bug: 302723053 Change-Id: Id9355c10d78d0c55afb49f512b78bb0923fbc4f7 --- libs/binder/ProcessState.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libs/binder/ProcessState.cpp') diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp index 7af2845f5d..0344eb04d6 100644 --- a/libs/binder/ProcessState.cpp +++ b/libs/binder/ProcessState.cpp @@ -18,9 +18,9 @@ #include -#include #include #include +#include #include #include #include @@ -60,6 +60,8 @@ const char* kDefaultDriver = "/dev/binder"; namespace android { +using namespace android::binder::impl; + class PoolThread : public Thread { public: @@ -430,7 +432,7 @@ status_t ProcessState::setThreadPoolMaxThreadCount(size_t maxThreads) { size_t ProcessState::getThreadPoolMaxTotalThreadCount() const { pthread_mutex_lock(&mThreadCountLock); - base::ScopeGuard detachGuard = [&]() { pthread_mutex_unlock(&mThreadCountLock); }; + auto detachGuard = make_scope_guard([&]() { pthread_mutex_unlock(&mThreadCountLock); }); if (mThreadPoolStarted) { LOG_ALWAYS_FATAL_IF(mKernelStartedThreads > mMaxThreads + 1, -- cgit v1.2.3-59-g8ed1b