Revert "Revert "Use Linux Atomic / thanks to emwo""

This reverts commit 8f62c673bdb13fcec9f32a3a9477290c882e71ab.