Remove redundant LOCK prefix
PATCH 1/1 Remove redundant LOCK prefix
According to Linux and the Intel spec, this prefix is not needed.
--- include/asm-x86/atomic_32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/asm-x86/atomic_32.h +1 -1
@@ -64,7 +64,7 @@ struct __xeno_xchg_dummy { unsigned longstatic inline unsigned long xnarch_atomic_xchg (volatile void *ptr,unsigned long x) { - __asm__ __volatile__(LOCK_PREFIX "xchgl %0,%1" + __asm__ __volatile__("xchgl %0,%1" :"=r" (x) :"m" (*__xeno_xg (ptr)),"0" (x) :"memory" );
Quoted 2 lines · Jan Kiszka
According to Linux and the Intel spec, this prefix is not needed.
Obviously, it's not, since the whole purpose of xchg() is to guarantee bus locking for memory operands anyway. Please merge.
Quoted 26 lines
--- include/asm-x86/atomic_32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Index:
b/include/asm-x86/atomic_32.h
===================================================================include/asm-x86/atomic_32.h +1
-2@@ -64,7 +64,7 @@ struct __xeno_xchg_dummy { unsigned longstatic inline unsigned long xnarch_atomic_xchg (volatile void *ptr,unsigned long x) { - __asm__ __volatile__(LOCK_PREFIX "xchgl %0,%1" + __asm__ __volatile__("xchgl %0,%1" :"=r" (x) :"m" (*__xeno_xg (ptr)),"0" (x) :"memory" ); ------------------------------------------------------------------------_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core
Signature · 1 line
Philippe.