[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 01/11] mini-os: Make some headers more rumpkernel-friendly
Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- include/mini-os/os.h | 15 ++++++++++----- include/mini-os/spinlock.h | 2 ++ include/mini-os/x86/mm.h | 4 ++++ include/mini-os/x86/spinlock.h | 3 +++ 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/include/mini-os/os.h b/include/mini-os/os.h index 9938d31..675a2bf 100644 --- a/include/mini-os/os.h +++ b/include/mini-os/os.h @@ -1,17 +1,20 @@ #ifndef _MINIOS_OS_H_ #define _MINIOS_OS_H_ -#if __GNUC__ == 2 && __GNUC_MINOR__ < 96 -#define __builtin_expect(x, expected_value) (x) -#endif +#define smp_processor_id() 0 #define unlikely(x) __builtin_expect((x),0) #define likely(x) __builtin_expect((x),1) -#define smp_processor_id() 0 +#include <mini-os/hypervisor.h> + +#ifndef __RUMP_KERNEL__ + +#if __GNUC__ == 2 && __GNUC_MINOR__ < 96 +#define __builtin_expect(x, expected_value) (x) +#endif #ifndef __ASSEMBLY__ #include <mini-os/types.h> -#include <mini-os/hypervisor.h> #include <mini-os/kernel.h> #endif @@ -21,4 +24,6 @@ #include <mini-os/machine/os.h> +#endif /* !__RUMP_KERNEL__ */ + #endif /* _MINIOS_OS_H_ */ diff --git a/include/mini-os/spinlock.h b/include/mini-os/spinlock.h index 5e662bb..b87ffe5 100644 --- a/include/mini-os/spinlock.h +++ b/include/mini-os/spinlock.h @@ -1,7 +1,9 @@ #ifndef __MINIOS_ASM_SPINLOCK_H #define __MINIOS_ASM_SPINLOCK_H +#ifndef __RUMP_KERNEL__ #include <mini-os/lib.h> +#endif /* * Your basic SMP spinlocks, allowing only a single CPU anywhere diff --git a/include/mini-os/x86/mm.h b/include/mini-os/x86/mm.h index e41ef74..2a73d08 100644 --- a/include/mini-os/x86/mm.h +++ b/include/mini-os/x86/mm.h @@ -36,6 +36,8 @@ #endif #endif +#ifndef __RUMP_KERNEL__ + #define L1_FRAME 1 #define L2_FRAME 2 #define L3_FRAME 3 @@ -231,4 +233,6 @@ static __inline__ paddr_t machine_to_phys(maddr_t machine) pgentry_t *need_pgt(unsigned long addr); int mfn_is_ram(unsigned long mfn); +#endif /* !__RUMP_KERNEL__ */ + #endif /* _ARCH_MM_H_ */ diff --git a/include/mini-os/x86/spinlock.h b/include/mini-os/x86/spinlock.h index 4b8faf7..b22f2a4 100644 --- a/include/mini-os/x86/spinlock.h +++ b/include/mini-os/x86/spinlock.h @@ -3,7 +3,10 @@ #ifndef __ARCH_ASM_SPINLOCK_H #define __ARCH_ASM_SPINLOCK_H +#ifndef __RUMP_KERNEL__ #include <mini-os/lib.h> +#endif + #include "os.h" -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |