High-level Compare And Swap (CAS) functions?

后端 未结 7 1424
清酒与你
清酒与你 2020-12-28 08:43

I\'d like to document what high-level (i.e. C++ not inline assembler ) functions or macros are available for Compare And Swap (CAS) atomic primitives...

E.g., WIN32

7条回答
  •  醉酒成梦
    2020-12-28 09:25

    I'll let others list the various platform-specific APIs, but for future reference in C++09 you'll get the

    atomic_compare_exchange() 
    

    operation in the new "Atomic operations library".

提交回复
热议问题