[LTP] tst_atomic_add_return() implementation for sparc

Cyril Hrubis chrubis@suse.cz
Thu May 11 10:12:17 CEST 2017


Hi!
> > 	int ret;
> > 	__asm__ __volatile__("": : :"memory");
> > 	ret = (counter = counter + 1);
> >         __asm__ __volatile__("": : :"memory");
> > 	return ret;
> 
> > Should work, but I do not have any sparc hardware for testing...
> Thanks a lot! I'll try to find some sparc to test it :).

There is a lib/newlib_tests/test09.c that is supposed to assert correct
implementation of the atomic operation.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list