Something went wrong. Try again.
Mirror — see github.com/blacksky-algorithms/blacksky.community
Something went wrong. Try again.
2.3 kB · 53 lines
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354diff --git a/node_modules/react-native/React/Base/Surface/RCTSurface.mm b/node_modules/react-native/React/Base/Surface/RCTSurface.mmindex 14f88de..cee524b 100644--- a/node_modules/react-native/React/Base/Surface/RCTSurface.mm+++ b/node_modules/react-native/React/Base/Surface/RCTSurface.mm@@ -465,7 +465,7 @@ // right after the semaphore signals. // Atomic variant of `_waitingForMountingStageOnMainQueue = YES;`- atomic_fetch_or(&_waitingForMountingStageOnMainQueue, 1);+ atomic_exchange(&_waitingForMountingStageOnMainQueue, 1); } dispatch_semaphore_t semaphore;@@ -488,7 +488,7 @@ auto timeoutOccurred = dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, timeout * NSEC_PER_SEC)); // Atomic equivalent of `_waitingForMountingStageOnMainQueue = NO;`.- atomic_fetch_and(&_waitingForMountingStageOnMainQueue, 0);+ atomic_exchange(&_waitingForMountingStageOnMainQueue, 0); if (!timeoutOccurred) { // Balancing the semaphore.@@ -546,7 +546,7 @@ { if (atomic_load(&_waitingForMountingStageOnMainQueue) && (self.stage & RCTSurfaceStageSurfaceDidInitialLayout)) { // Atomic equivalent of `_waitingForMountingStageOnMainQueue = NO;`.- atomic_fetch_and(&_waitingForMountingStageOnMainQueue, 0);+ atomic_exchange(&_waitingForMountingStageOnMainQueue, 0); { std::lock_guard<std::mutex> lock(_mutex);diff --git a/node_modules/react-native/React/Profiler/RCTProfile.m b/node_modules/react-native/React/Profiler/RCTProfile.mindex 994e8ad..287b934 100644--- a/node_modules/react-native/React/Profiler/RCTProfile.m+++ b/node_modules/react-native/React/Profiler/RCTProfile.m@@ -445,7 +445,7 @@ BOOL RCTProfileIsProfiling(void) void RCTProfileInit(RCTBridge *bridge) { // TODO: enable assert JS thread from any file (and assert here)- BOOL wasProfiling = atomic_fetch_or(&RCTProfileProfiling, 1);+ BOOL wasProfiling = atomic_exchange(&RCTProfileProfiling, 1); if (wasProfiling) { return; }@@ -492,7 +492,7 @@ void RCTProfileInit(RCTBridge *bridge) void RCTProfileEnd(RCTBridge *bridge, void (^callback)(NSString *)) { // assert JavaScript thread here again- BOOL wasProfiling = atomic_fetch_and(&RCTProfileProfiling, 0);+ BOOL wasProfiling = atomic_exchange(&RCTProfileProfiling, 0); if (!wasProfiling) { return; }