Skip to content

Commit

Permalink
Change back to lock_guard
Browse files Browse the repository at this point in the history
  • Loading branch information
jtung-apple committed Feb 19, 2025
1 parent afd5977 commit c873f54
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/darwin/Framework/CHIP/MTRDeviceController_XPC.mm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#import "MTRDevice_XPC_Internal.h"
#import "MTRError_Internal.h"
#import "MTRLogging_Internal.h"
#import "MTRUnfairLock.h"
#import "MTRXPCClientProtocol.h"
#import "MTRXPCServerProtocol.h"

Expand Down Expand Up @@ -72,7 +73,7 @@ @implementation MTRDeviceController_XPC

- (void)_updateRegistrationInfo
{
os_unfair_lock_lock(self.deviceMapLock);
std::lock_guard lock(*self.deviceMapLock);

NSMutableDictionary * registrationInfo = [NSMutableDictionary dictionary];

Expand All @@ -92,8 +93,6 @@ - (void)_updateRegistrationInfo
MTR_REQUIRED_ATTRIBUTE(MTRDeviceControllerRegistrationControllerContextKey, controllerContext, registrationInfo)

[self updateControllerConfiguration:registrationInfo];

os_unfair_lock_unlock(self.deviceMapLock);
}

- (void)_registerNodeID:(NSNumber *)nodeID
Expand Down

0 comments on commit c873f54

Please sign in to comment.