PAPI 7.1.0.0
Loading...
Searching...
No Matches
generic.h File Reference
Include dependency graph for generic.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define AO_GCC_ATOMIC_TEST_AND_SET
 
#define AO_compiler_barrier()   __atomic_signal_fence(__ATOMIC_SEQ_CST)
 
#define AO_HAVE_nop_read
 
#define AO_HAVE_nop_full
 
#define AO_CLEAR(addr)   __atomic_clear(addr, __ATOMIC_RELEASE)
 
#define AO_HAVE_CLEAR
 
#define AO_HAVE_test_and_set
 
#define AO_HAVE_test_and_set_acquire
 
#define AO_HAVE_test_and_set_release
 
#define AO_HAVE_test_and_set_full
 

Functions

AO_INLINE void AO_nop_read (void)
 
AO_INLINE void AO_nop_full (void)
 
AO_INLINE AO_TS_VAL_t AO_test_and_set (volatile AO_TS_t *addr)
 
AO_INLINE AO_TS_VAL_t AO_test_and_set_acquire (volatile AO_TS_t *addr)
 
AO_INLINE AO_TS_VAL_t AO_test_and_set_release (volatile AO_TS_t *addr)
 
AO_INLINE AO_TS_VAL_t AO_test_and_set_full (volatile AO_TS_t *addr)
 

Macro Definition Documentation

◆ AO_CLEAR

#define AO_CLEAR (   addr)    __atomic_clear(addr, __ATOMIC_RELEASE)

Definition at line 92 of file generic.h.

◆ AO_compiler_barrier

#define AO_compiler_barrier ( )    __atomic_signal_fence(__ATOMIC_SEQ_CST)

Definition at line 49 of file generic.h.

◆ AO_GCC_ATOMIC_TEST_AND_SET

#define AO_GCC_ATOMIC_TEST_AND_SET

Definition at line 22 of file generic.h.

◆ AO_HAVE_CLEAR

#define AO_HAVE_CLEAR

Definition at line 93 of file generic.h.

◆ AO_HAVE_nop_full

#define AO_HAVE_nop_full

Definition at line 84 of file generic.h.

◆ AO_HAVE_nop_read

#define AO_HAVE_nop_read

Definition at line 67 of file generic.h.

◆ AO_HAVE_test_and_set

#define AO_HAVE_test_and_set

Definition at line 100 of file generic.h.

◆ AO_HAVE_test_and_set_acquire

#define AO_HAVE_test_and_set_acquire

Definition at line 107 of file generic.h.

◆ AO_HAVE_test_and_set_full

#define AO_HAVE_test_and_set_full

Definition at line 121 of file generic.h.

◆ AO_HAVE_test_and_set_release

#define AO_HAVE_test_and_set_release

Definition at line 114 of file generic.h.

Function Documentation

◆ AO_nop_full()

AO_INLINE void AO_nop_full ( void  )

Definition at line 79 of file generic.h.

80 {
81 /* __sync_synchronize() could be used instead. */
82 __atomic_thread_fence(__ATOMIC_SEQ_CST);
83 }

◆ AO_nop_read()

AO_INLINE void AO_nop_read ( void  )

Definition at line 63 of file generic.h.

64 {
65 __atomic_thread_fence(__ATOMIC_ACQUIRE);
66 }

◆ AO_test_and_set()

AO_INLINE AO_TS_VAL_t AO_test_and_set ( volatile AO_TS_t addr)

Definition at line 96 of file generic.h.

97 {
98 return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELAXED);
99 }
#define AO_TS_VAL_t
Definition: gcc/hppa.h:44

◆ AO_test_and_set_acquire()

AO_INLINE AO_TS_VAL_t AO_test_and_set_acquire ( volatile AO_TS_t addr)

Definition at line 103 of file generic.h.

104 {
105 return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_ACQUIRE);
106 }

◆ AO_test_and_set_full()

AO_INLINE AO_TS_VAL_t AO_test_and_set_full ( volatile AO_TS_t addr)

Definition at line 117 of file generic.h.

118 {
119 return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_SEQ_CST);
120 }

◆ AO_test_and_set_release()

AO_INLINE AO_TS_VAL_t AO_test_and_set_release ( volatile AO_TS_t addr)

Definition at line 110 of file generic.h.

111 {
112 return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELEASE);
113 }