On 12 December 2014 at 10:51, Maxim Uvarov <[email protected]> wrote:
>
> On 12/12/2014 06:47 PM, Taras Kondratiuk wrote:
>
>> On 12/12/2014 05:03 PM, Maxim Uvarov wrote:
>>
>>> Odp atomic operations based on compiler build-ins. Make
>>> sure that compiler supports such operation at configure
>>> stage.
>>>
>> This check should be limited to platforms that use gcc atomics.
>>
> Do we have such platforms?
__OCTEON__ directly swappes out gcc, infact that pre processor switch
affects other files in linux-generic too.
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
}
>
>
> Maxim.
>
>
> _______________________________________________
> lng-odp mailing list
> [email protected]
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
--
*Mike Holmes*
Linaro Sr Technical Manager
LNG - ODP
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp