1 char v = 0;
2
3 char
atomic_fetch_add_RELAXED(char a)4 atomic_fetch_add_RELAXED (char a)
5 {
6 return __atomic_fetch_add (&v, a, __ATOMIC_RELAXED);
7 }
8
9 char
atomic_fetch_sub_RELAXED(char a)10 atomic_fetch_sub_RELAXED (char a)
11 {
12 return __atomic_fetch_sub (&v, a, __ATOMIC_RELAXED);
13 }
14
15 char
atomic_fetch_and_RELAXED(char a)16 atomic_fetch_and_RELAXED (char a)
17 {
18 return __atomic_fetch_and (&v, a, __ATOMIC_RELAXED);
19 }
20
21 char
atomic_fetch_nand_RELAXED(char a)22 atomic_fetch_nand_RELAXED (char a)
23 {
24 return __atomic_fetch_nand (&v, a, __ATOMIC_RELAXED);
25 }
26
27 char
atomic_fetch_xor_RELAXED(char a)28 atomic_fetch_xor_RELAXED (char a)
29 {
30 return __atomic_fetch_xor (&v, a, __ATOMIC_RELAXED);
31 }
32
33 char
atomic_fetch_or_RELAXED(char a)34 atomic_fetch_or_RELAXED (char a)
35 {
36 return __atomic_fetch_or (&v, a, __ATOMIC_RELAXED);
37 }
38