The library: github.com/dvyukov/relacy
Using tools::atomic instead of std::atomic is the hooks that in tests will call to relacy library.
Relacy itself provides stubs in std but that didn't quite work for me.
The wrapping I had to do is trivial github.com/DenisYaroshevskiyโฆ
Today I learned about "relacy" testing library for concurrency (link below) and managed to run an example.
Absolutely fantastic work by Dmitry Vyukov.
Let's mess with this atrocious mutex:
(I basically tried their example: 1024cores.net/home/relacy-raโฆ)