Lines Matching refs:_v
43 #define p_atomic_set(_v, _i) __atomic_store_n((_v), (_i), __ATOMIC_RELEASE) argument
44 #define p_atomic_read(_v) __atomic_load_n((_v), __ATOMIC_ACQUIRE) argument
45 #define p_atomic_read_relaxed(_v) __atomic_load_n((_v), __ATOMIC_RELAXED) argument
59 #define p_atomic_set(_v, _i) (*(_v) = (_i)) argument
60 #define p_atomic_read(_v) (*(_v)) argument
61 #define p_atomic_read_relaxed(_v) (*(_v)) argument
92 #define p_atomic_set(_v, _i) (*(_v) = (_i)) argument
93 #define p_atomic_read(_v) (*(_v)) argument
94 #define p_atomic_read_relaxed(_v) (*(_v)) argument
95 #define p_atomic_dec_zero(_v) (p_atomic_dec_return(_v) == 0) argument
96 #define p_atomic_inc(_v) ((void) p_atomic_inc_return(_v)) argument
97 #define p_atomic_dec(_v) ((void) p_atomic_dec_return(_v)) argument
98 #define p_atomic_add(_v, _i) ((void) p_atomic_add_return((_v), (_i))) argument
99 #define p_atomic_inc_return(_v) (++(*(_v))) argument
100 #define p_atomic_dec_return(_v) (--(*(_v))) argument
101 #define p_atomic_add_return(_v, _i) (*(_v) = *(_v) + (_i)) argument
102 #define p_atomic_fetch_add(_v, _i) (*(_v) = *(_v) + (_i), *(_v) - (_i)) argument
103 #define p_atomic_cmpxchg(_v, _old, _new) (*(_v) == (_old) ? (*(_v) = (_new), (_old)) : *(_v)) argument
104 #define p_atomic_cmpxchg_ptr(_v, _old, _new) p_atomic_cmpxchg(_v, _old, _new) argument
132 #define p_atomic_set(_v, _i) (*(_v) = (_i)) argument
133 #define p_atomic_read(_v) (*(_v)) argument
134 #define p_atomic_read_relaxed(_v) (*(_v)) argument
136 #define p_atomic_dec_zero(_v) \ argument
137 (p_atomic_dec_return(_v) == 0)
139 #define p_atomic_inc(_v) \ argument
140 ((void) p_atomic_inc_return(_v))
142 #define p_atomic_inc_return(_v) (\ argument
143 sizeof *(_v) == sizeof(short) ? _InterlockedIncrement16((short *) (_v)) : \
144 sizeof *(_v) == sizeof(long) ? _InterlockedIncrement ((long *) (_v)) : \
145 sizeof *(_v) == sizeof(__int64) ? InterlockedIncrement64 ((__int64 *)(_v)) : \
148 #define p_atomic_dec(_v) \ argument
149 ((void) p_atomic_dec_return(_v))
151 #define p_atomic_dec_return(_v) (\ argument
152 sizeof *(_v) == sizeof(short) ? _InterlockedDecrement16((short *) (_v)) : \
153 sizeof *(_v) == sizeof(long) ? _InterlockedDecrement ((long *) (_v)) : \
154 sizeof *(_v) == sizeof(__int64) ? InterlockedDecrement64 ((__int64 *)(_v)) : \
157 #define p_atomic_add(_v, _i) \ argument
158 ((void) p_atomic_fetch_add((_v), (_i)))
160 #define p_atomic_add_return(_v, _i) (\ argument
161 sizeof *(_v) == sizeof(long) ? InterlockedAdd ((long *) (_v), (_i)) : \
162 sizeof *(_v) == sizeof(__int64) ? InterlockedAdd64((__int64 *)(_v), (_i)) : \
165 #define p_atomic_fetch_add(_v, _i) (\ argument
166 sizeof *(_v) == sizeof(char) ? _InterlockedExchangeAdd8 ((char *) (_v), (_i)) : \
167 sizeof *(_v) == sizeof(short) ? _InterlockedExchangeAdd16((short *) (_v), (_i)) : \
168 sizeof *(_v) == sizeof(long) ? InterlockedExchangeAdd ((long *) (_v), (_i)) : \
169 sizeof *(_v) == sizeof(__int64) ? InterlockedExchangeAdd64((__int64 *)(_v), (_i)) : \
172 #define p_atomic_cmpxchg(_v, _old, _new) (\ argument
173 …sizeof *(_v) == sizeof(char) ? _InterlockedCompareExchange8 ((char *) (_v), (char) (_new), …
174 …sizeof *(_v) == sizeof(short) ? _InterlockedCompareExchange16((short *) (_v), (short) (_new), …
175 …sizeof *(_v) == sizeof(long) ? _InterlockedCompareExchange ((long *) (_v), (long) (_new), …
176 …sizeof *(_v) == sizeof(__int64) ? InterlockedCompareExchange64 ((__int64 *)(_v), (__int64)(_new), …
180 #define p_atomic_cmpxchg_ptr(_v, _old, _new) (void *)InterlockedCompareExchange64((__int64 *)(_v), … argument
182 #define p_atomic_cmpxchg_ptr(_v, _old, _new) (void *)InterlockedCompareExchange((long *)(_v), (long… argument
186 #define p_atomic_xchg(_v, _new) (\ argument
187 sizeof *(_v) == sizeof(long) ? InterlockedExchange ((long *) (_v), (long) (_new)) : \
188 sizeof *(_v) == sizeof(__int64) ? InterlockedExchange64((__int64 *)(_v), (__int64)(_new)) : \
200 #define p_atomic_set(_v, _i) (*(_v) = (_i)) argument
201 #define p_atomic_read(_v) (*(_v)) argument