CPU: introduce cpu_atomic_xchg()
authorarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 1 Nov 2010 16:26:07 +0000 (16:26 +0000)
committerarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 1 Nov 2010 16:26:07 +0000 (16:26 +0000)
commit0505dc06d425b604fbe0977a11588755c507767b
tree0d9858cbec89c0a50c025fbc676c03df5637ab8c
parent5a575c1b8547876925fb45fb2a0df43612f451f0
CPU: introduce cpu_atomic_xchg()

Add an architecture-optimized function to atomically exchange two
different cpu_atomic_t values.

More exactly, the function replaces the value of a cpu_atomic_t variable
and returns the old value, atomically.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4485 38d2e660-2303-0410-9eaa-f027e97ec537
bertos/cpu/byteorder.h