C has the _Atomic keyword that allows the creation of atomic variables that can be used instead of mutexes in some cases for lock-free yet still thread-safe multithreaded programming. This chapter covers the _Atomic keyword, atomic library functions, memory barriers, compare-and-swap, lock-free operations, the “ABA Problem,” versioned pointers, and false sharing.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

_Atomic

  • Paul J. Lucas

摘要

C has the _Atomic keyword that allows the creation of atomic variables that can be used instead of mutexes in some cases for lock-free yet still thread-safe multithreaded programming. This chapter covers the _Atomic keyword, atomic library functions, memory barriers, compare-and-swap, lock-free operations, the “ABA Problem,” versioned pointers, and false sharing.