Skip to content

Commit

Permalink
Fix variable shadowing
Browse files Browse the repository at this point in the history
  • Loading branch information
arkq committed Mar 31, 2023
1 parent 805437c commit 95eb311
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/platform/Linux/PlatformManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,14 +267,14 @@ CHIP_ERROR PlatformManagerImpl::_GLibMatterContextInvokeSync(CHIP_ERROR (*func)(
auto * data = reinterpret_cast<GLibMatterContextInvokeData *>(userData_);

// XXX: Temporary workaround for TSAN false positives.
std::unique_lock<std::mutex> lock(PlatformMgrImpl().mGLibMainLoopCallbackIndirectionMutex);
std::unique_lock<std::mutex> lock_(PlatformMgrImpl().mGLibMainLoopCallbackIndirectionMutex);

auto func = data->mFunc;
auto userData = data->mFuncUserData;
auto mFunc = data->mFunc;
auto mUserData = data->mFuncUserData;

lock.unlock();
auto result = func(userData);
lock.lock();
lock_.unlock();
auto result = mFunc(mUserData);
lock_.lock();

data->mDone = true;
data->mFuncResult = result;
Expand Down

0 comments on commit 95eb311

Please sign in to comment.