Module: xenomai-jki
Branch: for-upstream
Commit: ad70240cc91c5b3959fd093270fca61eb1c17ecc
URL:    
http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=ad70240cc91c5b3959fd093270fca61eb1c17ecc

Author: Wolfgang Mauerer <wolfgang.maue...@siemens.com>
Date:   Thu Jul  8 12:18:16 2010 +0200

nucleus: Add userland cpu_relax() definition for x86

Signed-off-by: Wolfgang Mauerer <wolfgang.maue...@siemens.com>
Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 include/asm-x86/atomic.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/asm-x86/atomic.h b/include/asm-x86/atomic.h
index bb3ce46..16bc990 100644
--- a/include/asm-x86/atomic.h
+++ b/include/asm-x86/atomic.h
@@ -71,6 +71,11 @@ typedef struct { unsigned long counter; } xnarch_atomic_t;
 
 #define xnarch_write_memory_barrier()  xnarch_memory_barrier()
 
+static inline void cpu_relax(void)
+{
+       asm volatile("rep; nop" ::: "memory");
+}
+
 #ifdef __i386__
 
 struct __xeno_xchg_dummy { unsigned long a[100]; };


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to