18#ifndef AO_NO_char_ARITHM
23 return __atomic_fetch_add(addr, incr, __ATOMIC_RELAXED);
25#define AO_HAVE_char_fetch_and_add
27#ifndef AO_SKIPATOMIC_ANY_and_ANY
31 (void)__atomic_and_fetch(addr, value, __ATOMIC_RELAXED);
33# define AO_HAVE_char_and
36#ifndef AO_SKIPATOMIC_ANY_or_ANY
38 AO_char_or(
volatile unsignedchar *addr,
unsignedchar value)
40 (void)__atomic_or_fetch(addr, value, __ATOMIC_RELAXED);
42# define AO_HAVE_char_or
45#ifndef AO_SKIPATOMIC_ANY_xor_ANY
49 (void)__atomic_xor_fetch(addr, value, __ATOMIC_RELAXED);
51# define AO_HAVE_char_xor
72#ifndef AO_NO_short_ARITHM
77 return __atomic_fetch_add(addr, incr, __ATOMIC_RELAXED);
79#define AO_HAVE_short_fetch_and_add
81#ifndef AO_SKIPATOMIC_ANY_and_ANY
85 (void)__atomic_and_fetch(addr, value, __ATOMIC_RELAXED);
87# define AO_HAVE_short_and
90#ifndef AO_SKIPATOMIC_ANY_or_ANY
92 AO_short_or(
volatile unsignedshort *addr,
unsignedshort value)
94 (void)__atomic_or_fetch(addr, value, __ATOMIC_RELAXED);
96# define AO_HAVE_short_or
99#ifndef AO_SKIPATOMIC_ANY_xor_ANY
103 (void)__atomic_xor_fetch(addr, value, __ATOMIC_RELAXED);
105# define AO_HAVE_short_xor
126#ifndef AO_NO_int_ARITHM
131 return __atomic_fetch_add(addr, incr, __ATOMIC_RELAXED);
133#define AO_HAVE_int_fetch_and_add
135#ifndef AO_SKIPATOMIC_ANY_and_ANY
139 (void)__atomic_and_fetch(addr, value, __ATOMIC_RELAXED);
141# define AO_HAVE_int_and
144#ifndef AO_SKIPATOMIC_ANY_or_ANY
148 (void)__atomic_or_fetch(addr, value, __ATOMIC_RELAXED);
150# define AO_HAVE_int_or
153#ifndef AO_SKIPATOMIC_ANY_xor_ANY
157 (void)__atomic_xor_fetch(addr, value, __ATOMIC_RELAXED);
159# define AO_HAVE_int_xor
185 return __atomic_fetch_add(addr, incr, __ATOMIC_RELAXED);
187#define AO_HAVE_fetch_and_add
189#ifndef AO_SKIPATOMIC_ANY_and_ANY
193 (void)__atomic_and_fetch(addr, value, __ATOMIC_RELAXED);
198#ifndef AO_SKIPATOMIC_ANY_or_ANY
202 (void)__atomic_or_fetch(addr, value, __ATOMIC_RELAXED);
207#ifndef AO_SKIPATOMIC_ANY_xor_ANY
211 (void)__atomic_xor_fetch(addr, value, __ATOMIC_RELAXED);
234#ifndef AO_NO_char_ARITHM
239 return __atomic_fetch_add(addr, incr, __ATOMIC_ACQUIRE);
241#define AO_HAVE_char_fetch_and_add_acquire
243#ifndef AO_SKIPATOMIC_ANY_and_ANY
247 (void)__atomic_and_fetch(addr, value, __ATOMIC_ACQUIRE);
249# define AO_HAVE_char_and_acquire
252#ifndef AO_SKIPATOMIC_ANY_or_ANY
256 (void)__atomic_or_fetch(addr, value, __ATOMIC_ACQUIRE);
258# define AO_HAVE_char_or_acquire
261#ifndef AO_SKIPATOMIC_ANY_xor_ANY
265 (void)__atomic_xor_fetch(addr, value, __ATOMIC_ACQUIRE);
267# define AO_HAVE_char_xor_acquire
288#ifndef AO_NO_short_ARITHM
293 return __atomic_fetch_add(addr, incr, __ATOMIC_ACQUIRE);
295#define AO_HAVE_short_fetch_and_add_acquire
297#ifndef AO_SKIPATOMIC_ANY_and_ANY
301 (void)__atomic_and_fetch(addr, value, __ATOMIC_ACQUIRE);
303# define AO_HAVE_short_and_acquire
306#ifndef AO_SKIPATOMIC_ANY_or_ANY
310 (void)__atomic_or_fetch(addr, value, __ATOMIC_ACQUIRE);
312# define AO_HAVE_short_or_acquire
315#ifndef AO_SKIPATOMIC_ANY_xor_ANY
319 (void)__atomic_xor_fetch(addr, value, __ATOMIC_ACQUIRE);
321# define AO_HAVE_short_xor_acquire
342#ifndef AO_NO_int_ARITHM
347 return __atomic_fetch_add(addr, incr, __ATOMIC_ACQUIRE);
349#define AO_HAVE_int_fetch_and_add_acquire
351#ifndef AO_SKIPATOMIC_ANY_and_ANY
355 (void)__atomic_and_fetch(addr, value, __ATOMIC_ACQUIRE);
357# define AO_HAVE_int_and_acquire
360#ifndef AO_SKIPATOMIC_ANY_or_ANY
364 (void)__atomic_or_fetch(addr, value, __ATOMIC_ACQUIRE);
366# define AO_HAVE_int_or_acquire
369#ifndef AO_SKIPATOMIC_ANY_xor_ANY
373 (void)__atomic_xor_fetch(addr, value, __ATOMIC_ACQUIRE);
375# define AO_HAVE_int_xor_acquire
401 return __atomic_fetch_add(addr, incr, __ATOMIC_ACQUIRE);
403#define AO_HAVE_fetch_and_add_acquire
405#ifndef AO_SKIPATOMIC_ANY_and_ANY
409 (void)__atomic_and_fetch(addr, value, __ATOMIC_ACQUIRE);
411# define AO_HAVE_and_acquire
414#ifndef AO_SKIPATOMIC_ANY_or_ANY
418 (void)__atomic_or_fetch(addr, value, __ATOMIC_ACQUIRE);
420# define AO_HAVE_or_acquire
423#ifndef AO_SKIPATOMIC_ANY_xor_ANY
427 (void)__atomic_xor_fetch(addr, value, __ATOMIC_ACQUIRE);
429# define AO_HAVE_xor_acquire
450#ifndef AO_NO_char_ARITHM
455 return __atomic_fetch_add(addr, incr, __ATOMIC_RELEASE);
457#define AO_HAVE_char_fetch_and_add_release
459#ifndef AO_SKIPATOMIC_ANY_and_ANY
463 (void)__atomic_and_fetch(addr, value, __ATOMIC_RELEASE);
465# define AO_HAVE_char_and_release
468#ifndef AO_SKIPATOMIC_ANY_or_ANY
472 (void)__atomic_or_fetch(addr, value, __ATOMIC_RELEASE);
474# define AO_HAVE_char_or_release
477#ifndef AO_SKIPATOMIC_ANY_xor_ANY
481 (void)__atomic_xor_fetch(addr, value, __ATOMIC_RELEASE);
483# define AO_HAVE_char_xor_release
504#ifndef AO_NO_short_ARITHM
509 return __atomic_fetch_add(addr, incr, __ATOMIC_RELEASE);
511#define AO_HAVE_short_fetch_and_add_release
513#ifndef AO_SKIPATOMIC_ANY_and_ANY
517 (void)__atomic_and_fetch(addr, value, __ATOMIC_RELEASE);
519# define AO_HAVE_short_and_release
522#ifndef AO_SKIPATOMIC_ANY_or_ANY
526 (void)__atomic_or_fetch(addr, value, __ATOMIC_RELEASE);
528# define AO_HAVE_short_or_release
531#ifndef AO_SKIPATOMIC_ANY_xor_ANY
535 (void)__atomic_xor_fetch(addr, value, __ATOMIC_RELEASE);
537# define AO_HAVE_short_xor_release
558#ifndef AO_NO_int_ARITHM
563 return __atomic_fetch_add(addr, incr, __ATOMIC_RELEASE);
565#define AO_HAVE_int_fetch_and_add_release
567#ifndef AO_SKIPATOMIC_ANY_and_ANY
571 (void)__atomic_and_fetch(addr, value, __ATOMIC_RELEASE);
573# define AO_HAVE_int_and_release
576#ifndef AO_SKIPATOMIC_ANY_or_ANY
580 (void)__atomic_or_fetch(addr, value, __ATOMIC_RELEASE);
582# define AO_HAVE_int_or_release
585#ifndef AO_SKIPATOMIC_ANY_xor_ANY
589 (void)__atomic_xor_fetch(addr, value, __ATOMIC_RELEASE);
591# define AO_HAVE_int_xor_release
617 return __atomic_fetch_add(addr, incr, __ATOMIC_RELEASE);
619#define AO_HAVE_fetch_and_add_release
621#ifndef AO_SKIPATOMIC_ANY_and_ANY
625 (void)__atomic_and_fetch(addr, value, __ATOMIC_RELEASE);
627# define AO_HAVE_and_release
630#ifndef AO_SKIPATOMIC_ANY_or_ANY
634 (void)__atomic_or_fetch(addr, value, __ATOMIC_RELEASE);
636# define AO_HAVE_or_release
639#ifndef AO_SKIPATOMIC_ANY_xor_ANY
643 (void)__atomic_xor_fetch(addr, value, __ATOMIC_RELEASE);
645# define AO_HAVE_xor_release
666#ifndef AO_NO_char_ARITHM
671 return __atomic_fetch_add(addr, incr, __ATOMIC_SEQ_CST);
673#define AO_HAVE_char_fetch_and_add_full
675#ifndef AO_SKIPATOMIC_ANY_and_ANY
679 (void)__atomic_and_fetch(addr, value, __ATOMIC_SEQ_CST);
681# define AO_HAVE_char_and_full
684#ifndef AO_SKIPATOMIC_ANY_or_ANY
688 (void)__atomic_or_fetch(addr, value, __ATOMIC_SEQ_CST);
690# define AO_HAVE_char_or_full
693#ifndef AO_SKIPATOMIC_ANY_xor_ANY
697 (void)__atomic_xor_fetch(addr, value, __ATOMIC_SEQ_CST);
699# define AO_HAVE_char_xor_full
720#ifndef AO_NO_short_ARITHM
725 return __atomic_fetch_add(addr, incr, __ATOMIC_SEQ_CST);
727#define AO_HAVE_short_fetch_and_add_full
729#ifndef AO_SKIPATOMIC_ANY_and_ANY
733 (void)__atomic_and_fetch(addr, value, __ATOMIC_SEQ_CST);
735# define AO_HAVE_short_and_full
738#ifndef AO_SKIPATOMIC_ANY_or_ANY
742 (void)__atomic_or_fetch(addr, value, __ATOMIC_SEQ_CST);
744# define AO_HAVE_short_or_full
747#ifndef AO_SKIPATOMIC_ANY_xor_ANY
751 (void)__atomic_xor_fetch(addr, value, __ATOMIC_SEQ_CST);
753# define AO_HAVE_short_xor_full
774#ifndef AO_NO_int_ARITHM
779 return __atomic_fetch_add(addr, incr, __ATOMIC_SEQ_CST);
781#define AO_HAVE_int_fetch_and_add_full
783#ifndef AO_SKIPATOMIC_ANY_and_ANY
787 (void)__atomic_and_fetch(addr, value, __ATOMIC_SEQ_CST);
789# define AO_HAVE_int_and_full
792#ifndef AO_SKIPATOMIC_ANY_or_ANY
796 (void)__atomic_or_fetch(addr, value, __ATOMIC_SEQ_CST);
798# define AO_HAVE_int_or_full
801#ifndef AO_SKIPATOMIC_ANY_xor_ANY
805 (void)__atomic_xor_fetch(addr, value, __ATOMIC_SEQ_CST);
807# define AO_HAVE_int_xor_full
833 return __atomic_fetch_add(addr, incr, __ATOMIC_SEQ_CST);
835#define AO_HAVE_fetch_and_add_full
837#ifndef AO_SKIPATOMIC_ANY_and_ANY
841 (void)__atomic_and_fetch(addr, value, __ATOMIC_SEQ_CST);
843# define AO_HAVE_and_full
846#ifndef AO_SKIPATOMIC_ANY_or_ANY
850 (void)__atomic_or_fetch(addr, value, __ATOMIC_SEQ_CST);
852# define AO_HAVE_or_full
855#ifndef AO_SKIPATOMIC_ANY_xor_ANY
859 (void)__atomic_xor_fetch(addr, value, __ATOMIC_SEQ_CST);
861# define AO_HAVE_xor_full
AO_INLINE void AO_char_xor_release(volatile unsignedchar *addr, unsignedchar value)
AO_INLINE AO_t AO_fetch_and_add_release(volatile AO_t *addr, AO_t incr)
AO_INLINE void AO_short_xor(volatile unsignedshort *addr, unsignedshort value)
AO_INLINE unsigned short AO_short_fetch_and_add(volatile unsignedshort *addr, unsignedshort incr)
AO_INLINE unsigned AO_int_fetch_and_add_full(volatile unsigned *addr, unsigned incr)
AO_INLINE AO_t AO_fetch_and_add(volatile AO_t *addr, AO_t incr)
AO_INLINE void AO_int_xor_acquire(volatile unsigned *addr, unsigned value)
AO_INLINE unsigned char AO_char_fetch_and_add_full(volatile unsignedchar *addr, unsignedchar incr)
AO_INLINE void AO_short_xor_full(volatile unsignedshort *addr, unsignedshort value)
AO_INLINE void AO_char_and_acquire(volatile unsignedchar *addr, unsignedchar value)
AO_INLINE void AO_char_or_acquire(volatile unsignedchar *addr, unsignedchar value)
AO_INLINE unsigned char AO_char_fetch_and_add_release(volatile unsignedchar *addr, unsignedchar incr)
AO_INLINE void AO_int_and_acquire(volatile unsigned *addr, unsigned value)
AO_INLINE AO_t AO_fetch_and_add_acquire(volatile AO_t *addr, AO_t incr)
AO_INLINE void AO_char_xor_acquire(volatile unsignedchar *addr, unsignedchar value)
AO_INLINE void AO_char_and_full(volatile unsignedchar *addr, unsignedchar value)
AO_INLINE unsigned short AO_short_fetch_and_add_full(volatile unsignedshort *addr, unsignedshort incr)
AO_INLINE void AO_xor_acquire(volatile AO_t *addr, AO_t value)
AO_INLINE unsigned short AO_short_fetch_and_add_release(volatile unsignedshort *addr, unsignedshort incr)
AO_INLINE void AO_char_or_full(volatile unsignedchar *addr, unsignedchar value)
AO_INLINE void AO_or_release(volatile AO_t *addr, AO_t value)
AO_INLINE void AO_short_and_full(volatile unsignedshort *addr, unsignedshort value)
AO_INLINE void AO_and(volatile AO_t *addr, AO_t value)
AO_INLINE void AO_char_xor_full(volatile unsignedchar *addr, unsignedchar value)
AO_INLINE void AO_char_and(volatile unsignedchar *addr, unsignedchar value)
AO_INLINE void AO_int_or(volatile unsigned *addr, unsigned value)
AO_INLINE void AO_or(volatile AO_t *addr, AO_t value)
AO_INLINE void AO_short_or_full(volatile unsignedshort *addr, unsignedshort value)
AO_INLINE unsigned short AO_short_fetch_and_add_acquire(volatile unsignedshort *addr, unsignedshort incr)
AO_INLINE void AO_short_and_release(volatile unsignedshort *addr, unsignedshort value)
AO_INLINE void AO_short_or_release(volatile unsignedshort *addr, unsignedshort value)
AO_INLINE void AO_short_xor_acquire(volatile unsignedshort *addr, unsignedshort value)
AO_INLINE void AO_int_or_acquire(volatile unsigned *addr, unsigned value)
AO_INLINE void AO_int_and_full(volatile unsigned *addr, unsigned value)
AO_INLINE void AO_short_and(volatile unsignedshort *addr, unsignedshort value)
AO_INLINE AO_t AO_fetch_and_add_full(volatile AO_t *addr, AO_t incr)
AO_INLINE void AO_char_or_release(volatile unsignedchar *addr, unsignedchar value)
AO_INLINE void AO_short_or_acquire(volatile unsignedshort *addr, unsignedshort value)
AO_INLINE void AO_char_and_release(volatile unsignedchar *addr, unsignedchar value)
AO_INLINE unsigned char AO_char_fetch_and_add(volatile unsignedchar *addr, unsignedchar incr)
AO_INLINE void AO_or_full(volatile AO_t *addr, AO_t value)
AO_INLINE void AO_int_xor_release(volatile unsigned *addr, unsigned value)
AO_INLINE void AO_and_full(volatile AO_t *addr, AO_t value)
AO_INLINE void AO_xor_release(volatile AO_t *addr, AO_t value)
AO_INLINE void AO_char_or(volatile unsignedchar *addr, unsignedchar value)
AO_INLINE void AO_int_xor_full(volatile unsigned *addr, unsigned value)
AO_INLINE void AO_short_or(volatile unsignedshort *addr, unsignedshort value)
AO_INLINE void AO_and_release(volatile AO_t *addr, AO_t value)
AO_INLINE void AO_char_xor(volatile unsignedchar *addr, unsignedchar value)
AO_INLINE void AO_int_and(volatile unsigned *addr, unsigned value)
AO_INLINE void AO_or_acquire(volatile AO_t *addr, AO_t value)
AO_INLINE void AO_int_or_full(volatile unsigned *addr, unsigned value)
AO_INLINE unsigned AO_int_fetch_and_add(volatile unsigned *addr, unsigned incr)
AO_INLINE void AO_and_acquire(volatile AO_t *addr, AO_t value)
AO_INLINE void AO_xor_full(volatile AO_t *addr, AO_t value)
AO_INLINE void AO_short_xor_release(volatile unsignedshort *addr, unsignedshort value)
AO_INLINE unsigned AO_int_fetch_and_add_acquire(volatile unsigned *addr, unsigned incr)
AO_INLINE void AO_xor(volatile AO_t *addr, AO_t value)
AO_INLINE void AO_short_and_acquire(volatile unsignedshort *addr, unsignedshort value)
AO_INLINE void AO_int_or_release(volatile unsigned *addr, unsigned value)
AO_INLINE unsigned char AO_char_fetch_and_add_acquire(volatile unsignedchar *addr, unsignedchar incr)
AO_INLINE unsigned AO_int_fetch_and_add_release(volatile unsigned *addr, unsigned incr)
AO_INLINE void AO_int_and_release(volatile unsigned *addr, unsigned value)
AO_INLINE void AO_int_xor(volatile unsigned *addr, unsigned value)