[LTP] tst_atomic_add_return() implementation for sparc

Cyril Hrubis chrubis@suse.cz
Tue May 23 13:14:34 CEST 2017


Hi!
> > Should work, but I do not have any sparc hardware for testing...
> 
> I tried this, but lib/newlib_tests/test09 (tested with 32 bit uClibc on sparc 64) fails
> :-(. Do you see any obvious error? I hope the problem isn't 64 bit architecture.

Looks like the real implementation is in arch/sparc/lib/atomic32.c and
arch/sparc/lib/atomic_64.S.

The 32bit implementation uses spinlocks, the 64bit v9 CPU has
instruction for atomic operations. See for instance this discussion:

https://forums.gentoo.org/viewtopic-t-97011-start-0.html

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list