Quantcast
Channel: How do atomics larger than the CPU's native support work - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Alex Guteniev for How do atomics larger than the CPU's native...

TL;DR: it is a userspace spinlock, a bad decision that is currently locked for some time for ABI reasons.MSVC uses a spinlock for atomic but a SRWLOCK for atomic_refSee the source: // Spinlock integer...

View Article



Answer by doron for How do atomics larger than the CPU's native support work

If there is no machine code primitive to perform the action without a lock, std::atomic will add the required lock to ensure things are atomic.There is a even a compile time is_always_lock_free member...

View Article

How do atomics larger than the CPU's native support work

With current C++ compilers you can have atomic support of atomics that are larger than the actual support of your CPU. With x64 you can have atomics that are 16 bytes, but std::atomic also works with...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>