From 66ee192e35245f43110d123a06975574e61d7e8d Mon Sep 17 00:00:00 2001 From: Tomasz Wasilczyk Date: Thu, 26 Oct 2023 14:53:49 -0700 Subject: Binder: migrate off libutils Mutex Bug: 302723053 Test: mma Change-Id: I5b81d5c0b6c7fef7f2216d4010adfa9cf72f9876 --- libs/binder/ProcessState.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libs/binder/ProcessState.cpp') diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp index 8ec4af9945..58203c1373 100644 --- a/libs/binder/ProcessState.cpp +++ b/libs/binder/ProcessState.cpp @@ -189,7 +189,7 @@ void ProcessState::childPostFork() { void ProcessState::startThreadPool() { - AutoMutex _l(mLock); + std::unique_lock _l(mLock); if (!mThreadPoolStarted) { if (mMaxThreads == 0) { // see also getThreadPoolMaxTotalThreadCount @@ -203,7 +203,7 @@ void ProcessState::startThreadPool() bool ProcessState::becomeContextManager() { - AutoMutex _l(mLock); + std::unique_lock _l(mLock); flat_binder_object obj { .flags = FLAT_BINDER_FLAG_TXN_SECURITY_CTX, @@ -310,7 +310,7 @@ sp ProcessState::getStrongProxyForHandle(int32_t handle) { sp result; - AutoMutex _l(mLock); + std::unique_lock _l(mLock); if (handle == 0 && the_context_object != nullptr) return the_context_object; @@ -374,7 +374,7 @@ sp ProcessState::getStrongProxyForHandle(int32_t handle) void ProcessState::expungeHandle(int32_t handle, IBinder* binder) { - AutoMutex _l(mLock); + std::unique_lock _l(mLock); handle_entry* e = lookupHandleLocked(handle); -- cgit v1.2.3-59-g8ed1b