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

Go to the source code of this file.

Macros

#define _InterlockedIncrement   InterlockedIncrement
 
#define _InterlockedDecrement   InterlockedDecrement
 
#define _InterlockedExchangeAdd   InterlockedExchangeAdd
 
#define _InterlockedCompareExchange   InterlockedCompareExchange
 
#define AO_INTERLOCKED_VOLATILE
 
#define AO_HAVE_fetch_and_add_full
 
#define AO_HAVE_fetch_and_add1_full
 
#define AO_HAVE_fetch_and_sub1_full
 
#define AO_HAVE_int_fetch_and_add_full
 
#define AO_HAVE_int_fetch_and_add1_full
 
#define AO_HAVE_int_fetch_and_sub1_full
 

Functions

AO_INLINE AO_t AO_fetch_and_add_full (volatile AO_t *p, AO_t incr)
 
AO_INLINE AO_t AO_fetch_and_add1_full (volatile AO_t *p)
 
AO_INLINE AO_t AO_fetch_and_sub1_full (volatile AO_t *p)
 
AO_INLINE unsigned int AO_int_fetch_and_add_full (volatile unsigned int *p, unsigned int incr)
 
AO_INLINE unsigned int AO_int_fetch_and_add1_full (volatile unsigned int *p)
 
AO_INLINE unsigned int AO_int_fetch_and_sub1_full (volatile unsigned int *p)
 

Macro Definition Documentation

◆ _InterlockedCompareExchange

#define _InterlockedCompareExchange   InterlockedCompareExchange

Definition at line 48 of file common32_defs.h.

◆ _InterlockedDecrement

#define _InterlockedDecrement   InterlockedDecrement

Definition at line 46 of file common32_defs.h.

◆ _InterlockedExchangeAdd

#define _InterlockedExchangeAdd   InterlockedExchangeAdd

Definition at line 47 of file common32_defs.h.

◆ _InterlockedIncrement

#define _InterlockedIncrement   InterlockedIncrement

Definition at line 45 of file common32_defs.h.

◆ AO_HAVE_fetch_and_add1_full

#define AO_HAVE_fetch_and_add1_full

Definition at line 114 of file common32_defs.h.

◆ AO_HAVE_fetch_and_add_full

#define AO_HAVE_fetch_and_add_full

Definition at line 103 of file common32_defs.h.

◆ AO_HAVE_fetch_and_sub1_full

#define AO_HAVE_fetch_and_sub1_full

Definition at line 125 of file common32_defs.h.

◆ AO_HAVE_int_fetch_and_add1_full

#define AO_HAVE_int_fetch_and_add1_full

Definition at line 140 of file common32_defs.h.

◆ AO_HAVE_int_fetch_and_add_full

#define AO_HAVE_int_fetch_and_add_full

Definition at line 133 of file common32_defs.h.

◆ AO_HAVE_int_fetch_and_sub1_full

#define AO_HAVE_int_fetch_and_sub1_full

Definition at line 147 of file common32_defs.h.

◆ AO_INTERLOCKED_VOLATILE

#define AO_INTERLOCKED_VOLATILE

Definition at line 50 of file common32_defs.h.

Function Documentation

◆ AO_fetch_and_add1_full()

AO_INLINE AO_t AO_fetch_and_add1_full ( volatile AO_t p)

Definition at line 106 of file common32_defs.h.

107 {
108# ifdef AO_T_IS_INT
110# else
111 return _InterlockedIncrement64((__int64 volatile *)p) - 1;
112# endif
113 }
#define AO_INTERLOCKED_VOLATILE
Definition: common32_defs.h:50
#define _InterlockedIncrement
Definition: common32_defs.h:45

◆ AO_fetch_and_add_full()

AO_INLINE AO_t AO_fetch_and_add_full ( volatile AO_t p,
AO_t  incr 
)

Definition at line 95 of file common32_defs.h.

96 {
97# ifdef AO_T_IS_INT
99# else
100 return _InterlockedExchangeAdd64((__int64 volatile *)p, incr);
101# endif
102 }
#define _InterlockedExchangeAdd
Definition: common32_defs.h:47

◆ AO_fetch_and_sub1_full()

AO_INLINE AO_t AO_fetch_and_sub1_full ( volatile AO_t p)

Definition at line 117 of file common32_defs.h.

118 {
119# ifdef AO_T_IS_INT
121# else
122 return _InterlockedDecrement64((__int64 volatile *)p) + 1;
123# endif
124 }
#define _InterlockedDecrement
Definition: common32_defs.h:46

◆ AO_int_fetch_and_add1_full()

AO_INLINE unsigned int AO_int_fetch_and_add1_full ( volatile unsigned int p)

Definition at line 136 of file common32_defs.h.

137 {
138 return _InterlockedIncrement((long volatile *)p) - 1;
139 }

◆ AO_int_fetch_and_add_full()

AO_INLINE unsigned int AO_int_fetch_and_add_full ( volatile unsigned int p,
unsigned int  incr 
)

Definition at line 129 of file common32_defs.h.

130 {
131 return _InterlockedExchangeAdd((long volatile *)p, incr);
132 }

◆ AO_int_fetch_and_sub1_full()

AO_INLINE unsigned int AO_int_fetch_and_sub1_full ( volatile unsigned int p)

Definition at line 143 of file common32_defs.h.

144 {
145 return _InterlockedDecrement((long volatile *)p) + 1;
146 }