On 12/23/2014 05:28 PM, Mike Holmes wrote:
> how will this work, Octeon does not care about __atomic_fetch_add(&v,
> 1, __ATOMIC_RELAXED); and yet you will fail configure I assume
>
> static inline uint32_t odp_atomic_fetch_inc_u32(odp_atomic_u32_t *atom)
> {
> #if defined __OCTEON__
>>-------uint32_t ret;
>>-------__asm__ __volatile__ ("syncws");
>>-------__asm__ __volatile__ ("lai %0,(%2)" : "=r" (ret), "+m" (atom) :
>>------->------->------- "r" (atom));
>>-------return ret;
> #else
>>-------return __atomic_fetch_add(&atom->v, 1, __ATOMIC_RELAXED);
> #endif
> }
Linux-generic shouldn't have arch specific parts, because it is
*generic*. Instead it can fall back to strong __sync functions if
__atomic are not available.
--
Taras Kondratiuk
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp