21 #ifndef AVUTIL_ATOMIC_GCC_H
22 #define AVUTIL_ATOMIC_GCC_H
28 #define avpriv_atomic_int_get atomic_int_get_gcc
35 #define avpriv_atomic_int_set atomic_int_set_gcc
42 #define avpriv_atomic_int_add_and_fetch atomic_int_add_and_fetch_gcc
45 return __sync_add_and_fetch(ptr, inc);
48 #define avpriv_atomic_ptr_cas atomic_ptr_cas_gcc
50 void *oldval,
void *newval)
52 #ifdef __ARMCC_VERSION
54 volatile uintptr_t *
tmp = (
volatile uintptr_t*)ptr;
55 return (
void*)__sync_val_compare_and_swap(tmp, oldval, newval);
57 return __sync_val_compare_and_swap(ptr, oldval, newval);
const char const char void * val
static void atomic_int_set_gcc(volatile int *ptr, int val)
static int atomic_int_add_and_fetch_gcc(volatile int *ptr, int inc)
static int atomic_int_get_gcc(volatile int *ptr)
static void * atomic_ptr_cas_gcc(void *volatile *ptr, void *oldval, void *newval)