Skip to content

Commit d92834c

Browse files
authored
[CORE] Change memory order for std::atomic_flag::test_and_set in FastCriticalSectionClass and ProfileFastCS (#1057)
1 parent 68d4db3 commit d92834c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Core/Libraries/Source/WWVegas/WWLib/mutex.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ class FastCriticalSectionClass
184184
BitSet:
185185
;
186186
#else
187-
while (cs.Flag.test_and_set(std::memory_order_acquire)) {
187+
while (cs.Flag.test_and_set(std::memory_order_acq_rel)) {
188188
cs.Flag.wait(true, std::memory_order_relaxed);
189189
}
190190
#endif

Core/Libraries/Source/profile/internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class ProfileFastCS
9393

9494
void ThreadSafeSetFlag()
9595
{
96-
while (Flag.test_and_set(std::memory_order_acquire)) {
96+
while (Flag.test_and_set(std::memory_order_acq_rel)) {
9797
Flag.wait(true, std::memory_order_relaxed);
9898
}
9999
}

0 commit comments

Comments
 (0)