Skip to content

Commit c38b49e

Browse files
committed
[runloop] Fix the failure memory order argument to atomic_compare_exchange_strong_explicit
The failure memory order cannot be release or acq_rel. Clang since llvm/llvm-project@fed5644 diagnoses an invalid argument.
1 parent 1b514e4 commit c38b49e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CoreFoundation/RunLoop.subproj/CFRunLoop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,7 @@ static Boolean __CFRunLoopSourceIsSignaled(CFRunLoopSourceRef rls) {
13061306
}
13071307

13081308
CF_INLINE void __CFRunLoopSourceSetSignaled(CFRunLoopSourceRef rls) {
1309-
atomic_compare_exchange_strong_explicit(&rls->_signaledTime, &(uint64_t){0}, mach_absolute_time(), memory_order_acq_rel, memory_order_acq_rel);
1309+
atomic_compare_exchange_strong_explicit(&rls->_signaledTime, &(uint64_t){0}, mach_absolute_time(), memory_order_acq_rel, memory_order_acquire);
13101310
}
13111311

13121312
CF_INLINE void __CFRunLoopSourceUnsetSignaled(CFRunLoopSourceRef rls) {

0 commit comments

Comments
 (0)