Why do we need acquire/release here? Where is the barrier pair?
In the same function. To ensure QueryPerformanceFrequency happens before QueryPerformanceCounter in another thread.
Why?
https://docs.gtk.org/glib/func.atomic_int_get.html says: "This call acts as a full compiler and hardware memory barrier (before the get)."