5

I am working on a project that depends on GCC's atomic built-ins. While porting the project to Windows, I was trying to find the Interlocked* counterparts for GCC atomics. Most operations are actually available, but I miss operations that apply __ATOMIC_CONSUME and __ATOMIC_ACQ_REL memory semantics. As _*Barrier intrinsics are deprecated, Microsoft advises to use std::atomic (e.g. atomic_thread_fence) and alike of the C++11 standard.

I was wondering: What is the C programmer supposed to do and how can we implement a portable version of atomics with __ATOMIC_CONSUME and __ATOMIC_ACQ_REL semantics, without using C++11?

Jonathan Drapeau
  • 2,610
  • 2
  • 26
  • 32
Sebastian B.
  • 287
  • 4
  • 19

1 Answers1

0

You should consider using parts of mintomics

Elazar Leibovich
  • 32,750
  • 33
  • 122
  • 169