On 12/18/2016 01:41 PM, Andreas Schwab wrote: > On Dez 18 2016, John Paul Adrian Glaubitz <glaub...@physik.fu-berlin.de> > wrote: > >> Does anyone know how these are implemented on m68k? Does m68k use helper >> functions in the kernel or is this actually done in hardware? > > m68k has CAS, of course. armv7 should be good enough, too.
I knew m68k has CAS/CAS2, but my suspicion was that lock-free atomics require LDREX/STREX-alike instructions since older ARM implementations have SWP/SWPB as well. So it shouldn't be too different from the CAS instructions on m68k, should it? Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913