PAPI 7.1.0.0
Loading...
Searching...
No Matches
tile.h
Go to the documentation of this file.
1/*
2 * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
3 * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
4 *
5 * Permission is hereby granted to use or copy this program
6 * for any purpose, provided the above notices are retained on all copies.
7 * Permission to modify the code and to distribute modified code is granted,
8 * provided the above notices are retained, and a notice that the code was
9 * modified is included with the above copyright notice.
10 */
11
12/* Minimal support for tile. */
13
14#if (AO_GNUC_PREREQ(4, 8) || AO_CLANG_PREREQ(3, 4)) \
15 && !defined(AO_DISABLE_GCC_ATOMICS)
16
17# include "generic.h"
18
19#else /* AO_DISABLE_GCC_ATOMICS */
20
21# include "../all_atomic_load_store.h"
22
23# include "../test_and_set_t_is_ao_t.h"
24
25 AO_INLINE void
27 {
28 __sync_synchronize();
29 }
30# define AO_HAVE_nop_full
31
33 AO_fetch_and_add_full(volatile AO_t *p, AO_t incr)
34 {
35 return __sync_fetch_and_add(p, incr);
36 }
37# define AO_HAVE_fetch_and_add_full
38
40 AO_fetch_compare_and_swap_full(volatile AO_t *addr, AO_t old_val,
41 AO_t new_val)
42 {
43 return __sync_val_compare_and_swap(addr, old_val, new_val
44 /* empty protection list */);
45 }
46# define AO_HAVE_fetch_compare_and_swap_full
47
48#endif /* AO_DISABLE_GCC_ATOMICS */
#define AO_t
Definition: atomic_ops.h:156
#define AO_INLINE
Definition: atomic_ops.h:186
#define AO_fetch_compare_and_swap_full(addr, old, newval)
Definition: emul_cas.h:61
AO_INLINE AO_t AO_fetch_and_add_full(volatile AO_t *p, AO_t incr)
Definition: tile.h:33
AO_INLINE void AO_nop_full(void)
Definition: tile.h:26