Index: kernel/arch/amd64/include/context.h
===================================================================
--- kernel/arch/amd64/include/context.h	(revision 088cecc97a4e21cb1647840c41cee125f006a3b3)
+++ kernel/arch/amd64/include/context.h	(revision 7397c735f9919668a12f6a66a415c0d1fe4d7de1)
@@ -36,4 +36,6 @@
 #define KERN_amd64_CONTEXT_H_
 
+#ifdef KERNEL
+
 #include <arch/types.h>
 
@@ -43,4 +45,6 @@
  */
 #define SP_DELTA     16
+
+#endif /* KERNEL */
 
 /* We include only registers that must be preserved
Index: kernel/arch/amd64/include/context_offset.h
===================================================================
--- kernel/arch/amd64/include/context_offset.h	(revision 088cecc97a4e21cb1647840c41cee125f006a3b3)
+++ kernel/arch/amd64/include/context_offset.h	(revision 7397c735f9919668a12f6a66a415c0d1fe4d7de1)
@@ -40,3 +40,16 @@
 #define OFFSET_IPL 0x40
 
+#ifdef __ASM__
+
+# ctx: address of the structure with saved context 
+# pc: return address
+.macro CONTEXT_SAVE_ARCH_CORE ctx:req pc:req
+.endm
+
+# ctx: address of the structure with saved context 
+.macro CONTEXT_RESTORE_ARCH_CORE ctx:req pc:req
+.endm
+
 #endif
+
+#endif
