1 /* Test __atomic routines for existence and execution. */
4 /* Test that __atomic_test_and_set and __atomic_clear builtins execute. */
6 extern void abort(void);
13 __atomic_clear (&a, __ATOMIC_RELAXED);
17 b = __atomic_test_and_set (&a, __ATOMIC_SEQ_CST);
18 if (a != __GCC_ATOMIC_TEST_AND_SET_TRUEVAL || b != 0)
21 b = __atomic_test_and_set (&a, __ATOMIC_ACQ_REL);
22 if (a != __GCC_ATOMIC_TEST_AND_SET_TRUEVAL || b != 1)
25 __atomic_clear (&a, __ATOMIC_SEQ_CST);