Unlikely that we'll hit a case where __sync_fetch_and_add is present
while __sync_add_and_fetch isn't. Regardless let's keep things sane and
consistent.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
drm_cv_atomic_primitives="none"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
- int atomic_add(int *i) { return __sync_fetch_and_add (i, 1); }
+ int atomic_add(int *i) { return __sync_add_and_fetch (i, 1); }
int atomic_cmpxchg(int *i, int j, int k) { return __sync_val_compare_and_swap (i, j, k); }
]],[[]])], [drm_cv_atomic_primitives="Intel"],[])