Getting following warning in Xcode 8 / Swift 3:
warning: 'OSAtomicCompareAndSwap32Barrier' was deprecated in OS X 10.12:
Use atomic_compare_exchange_strong() from <stdatomic.h> instead
Attempt to use function atomic_compare_exchange_strong
in Swift code leads compiler error:
error: use of unresolved identifier 'atomic_compare_exchange_strong'
Importing Darwin
or CoreFoundation
modules does not solve problem.
What module should I import in order to get symbol for atomic_compare_exchange_strong
?
Thank you!
I know this is a question for Swift 3, but in case anyone stumbles across this, now there is a Swift Atomics package (introduced in Oct 2020) which can be used for this functionality.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With