]> git.baikalelectronics.ru Git - kernel.git/commit
arch/tile: use better definitions of xchg() and cmpxchg()
authorChris Metcalf <cmetcalf@tilera.com>
Mon, 16 May 2011 17:59:39 +0000 (13:59 -0400)
committerChris Metcalf <cmetcalf@tilera.com>
Fri, 20 May 2011 02:55:49 +0000 (22:55 -0400)
commitb198b5b9f683e80af431283a3f17b07402b04344
treee9376caaf70b54e4b236840a1cc77a443c07b341
parentcb485aeca3a39d13e962cd65a71c37b988ea6249
arch/tile: use better definitions of xchg() and cmpxchg()

These definitions use a ({}) construct to avoid some cases where
we were getting warnings about unused return values.  We also
promote the definition to the common <asm/atomic.h>, since it applies
to both the 32- and 64-bit atomics.

In addition, define __HAVE_ARCH_CMPXCHG for TILE-Gx since it has
efficient direct atomic instructions.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
arch/tile/include/asm/atomic.h
arch/tile/include/asm/atomic_32.h
arch/tile/include/asm/atomic_64.h