Woops, woops! atomics.net has been released finally.

Let’s recap the project’s goals:

  • C++ 11 atomics alike API
  • Memory ordering semantics
  • ARM architecture support, x86 optimization

C++ 11 atomics alike API

The code generated by JIT uses the same strategy for memory ordering semantics as MSVC 2015, Clang and GCC compilers do, i.e. native (assembler) code is compatible.

Memory ordering semantics

Combining manual usage of barriers/fences with guarantees from CLI makes possible implementation of Relaxed, Acqure, Release, AcquireRelease and even Sequential consistent memory orderings. (C) Works on .NET and Mono by using atomics.net

ARM architecture support, x86 optimization

Intel x86 and ARM are (obviously) different, especially in out-of-order execution discipline, e.g. number of reorderings is much higher in a case of ARM, while x86 remains more conservative. For example, wrapping a plain write operation between 2 memory barriers is needed on ARM, but unnecessary on x86 (only one needs to be used). NuGet package contains dlls of net45, net40, PCL, UWP profiles for x86, x64 and ARM targets.