]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/ext/atomic-2.C
PR c++/57926
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / ext / atomic-2.C
1 // PR c++/57926
2
3 long Mutex[1];
4
5 int AcquireLogMutex(void)
6 {
7 return __atomic_exchange_n(Mutex, 1, __ATOMIC_SEQ_CST);
8 }
9
10 void ReleaseLogMutex(void)
11 {
12 long i = 0;
13 __atomic_store(Mutex, &i, __ATOMIC_SEQ_CST);
14 }