-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
atomics: Implement atomic_compiler_barrier(), misc improvements
- Implement atomic_compiler_barrier() to prevent compiler reordering (Special case use only!) - Optimize atomic_fence_ex(ATOMIC_SEQ_CST) on x86_64 by using a lock-prefixed RMW (Clang & older GCC commonly emit a slower mfence) - Prevent atomic_load_pointer() pessimization: Compilers treat ATOMIC_CONSUME as ATOMIC_ACQUIRE, which actually only matters for DEC Alpha - Fix return of a void value in atomic_store_pointer() - Extensively document the behavior of memory reordering and fence usage
- Loading branch information
Showing
1 changed file
with
57 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters