| 1 |
int v = 0; |
| 2 |
|
| 3 |
int |
| 4 |
sync_fetch_and_add (int a) |
| 5 |
{ |
| 6 |
return __sync_fetch_and_add (&v, a); |
| 7 |
} |
| 8 |
|
| 9 |
int |
| 10 |
sync_fetch_and_sub (int a) |
| 11 |
{ |
| 12 |
return __sync_fetch_and_sub (&v, a); |
| 13 |
} |
| 14 |
|
| 15 |
int |
| 16 |
sync_fetch_and_and (int a) |
| 17 |
{ |
| 18 |
return __sync_fetch_and_and (&v, a); |
| 19 |
} |
| 20 |
|
| 21 |
int |
| 22 |
sync_fetch_and_nand (int a) |
| 23 |
{ |
| 24 |
return __sync_fetch_and_nand (&v, a); |
| 25 |
} |
| 26 |
|
| 27 |
int |
| 28 |
sync_fetch_and_xor (int a) |
| 29 |
{ |
| 30 |
return __sync_fetch_and_xor (&v, a); |
| 31 |
} |
| 32 |
|
| 33 |
int |
| 34 |
sync_fetch_and_or (int a) |
| 35 |
{ |
| 36 |
return __sync_fetch_and_or (&v, a); |
| 37 |
} |
| 38 |
|
| 39 |
int |
| 40 |
sync_add_and_fetch (int a) |
| 41 |
{ |
| 42 |
return __sync_add_and_fetch (&v, a); |
| 43 |
} |
| 44 |
|
| 45 |
int |
| 46 |
sync_sub_and_fetch (int a) |
| 47 |
{ |
| 48 |
return __sync_sub_and_fetch (&v, a); |
| 49 |
} |
| 50 |
|
| 51 |
int |
| 52 |
sync_and_and_fetch (int a) |
| 53 |
{ |
| 54 |
return __sync_and_and_fetch (&v, a); |
| 55 |
} |
| 56 |
|
| 57 |
int |
| 58 |
sync_nand_and_fetch (int a) |
| 59 |
{ |
| 60 |
return __sync_nand_and_fetch (&v, a); |
| 61 |
} |
| 62 |
|
| 63 |
int |
| 64 |
sync_xor_and_fetch (int a) |
| 65 |
{ |
| 66 |
return __sync_xor_and_fetch (&v, a); |
| 67 |
} |
| 68 |
|
| 69 |
int |
| 70 |
sync_or_and_fetch (int a) |
| 71 |
{ |
| 72 |
return __sync_or_and_fetch (&v, a); |
| 73 |
} |