[CRIU] [PATCH 06/10] common: Move cmpxchng.h in

Cyrill Gorcunov gorcunov at openvz.org
Mon Oct 24 04:58:06 PDT 2016


Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 criu/arch/ppc64/include/asm/atomic.h                                 | 2 +-
 criu/arch/x86/include/asm/atomic.h                                   | 4 +---
 {criu/arch/ppc64/include => include/common/arch/ppc64}/asm/cmpxchg.h | 0
 {criu/arch/x86/include => include/common/arch/x86}/asm/cmpxchg.h     | 2 ++
 4 files changed, 4 insertions(+), 4 deletions(-)
 rename {criu/arch/ppc64/include => include/common/arch/ppc64}/asm/cmpxchg.h (100%)
 rename {criu/arch/x86/include => include/common/arch/x86}/asm/cmpxchg.h (98%)

diff --git a/criu/arch/ppc64/include/asm/atomic.h b/criu/arch/ppc64/include/asm/atomic.h
index 4fa33b1c7005..726825f997d6 100644
--- a/criu/arch/ppc64/include/asm/atomic.h
+++ b/criu/arch/ppc64/include/asm/atomic.h
@@ -11,7 +11,7 @@ typedef struct {
         int counter;
 } atomic_t;
 
-#include "asm/cmpxchg.h"
+#include "common/arch/ppc64/asm/cmpxchg.h"
 
 #define PPC_ATOMIC_ENTRY_BARRIER	"lwsync \n"
 #define PPC_ATOMIC_EXIT_BARRIER		"sync  	\n"
diff --git a/criu/arch/x86/include/asm/atomic.h b/criu/arch/x86/include/asm/atomic.h
index d447b65cb4c6..ec178e7cf807 100644
--- a/criu/arch/x86/include/asm/atomic.h
+++ b/criu/arch/x86/include/asm/atomic.h
@@ -1,9 +1,7 @@
 #ifndef __CR_ATOMIC_H__
 #define __CR_ATOMIC_H__
 
-#include "asm/cmpxchg.h"
-
-#define LOCK_PREFIX "\n\tlock; "
+#include "common/arch/x86/asm/cmpxchg.h"
 
 typedef struct {
 	int counter;
diff --git a/criu/arch/ppc64/include/asm/cmpxchg.h b/include/common/arch/ppc64/asm/cmpxchg.h
similarity index 100%
rename from criu/arch/ppc64/include/asm/cmpxchg.h
rename to include/common/arch/ppc64/asm/cmpxchg.h
diff --git a/criu/arch/x86/include/asm/cmpxchg.h b/include/common/arch/x86/asm/cmpxchg.h
similarity index 98%
rename from criu/arch/x86/include/asm/cmpxchg.h
rename to include/common/arch/x86/asm/cmpxchg.h
index afed44055d0f..4b6951933d83 100644
--- a/criu/arch/x86/include/asm/cmpxchg.h
+++ b/include/common/arch/x86/asm/cmpxchg.h
@@ -3,6 +3,8 @@
 
 #include <stdint.h>
 
+#define LOCK_PREFIX "\n\tlock; "
+
 #define __X86_CASE_B	1
 #define __X86_CASE_W	2
 #define __X86_CASE_L	4
-- 
2.7.4



More information about the CRIU mailing list