From 26f91ef506f5c0f63a399d84624142f318c4f048 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Mon, 7 Feb 2011 12:13:24 +0000 Subject: minios: do not export {test,set,clear}_bit etc to applications Fixes ioemu stubdom build: CC i386-stubdom/piix4acpi.o [...]/stubdom/ioemu/hw/piix4acpi.c:272: error: expected ')' before '?' token [...]/stubdom/ioemu/hw/piix4acpi.c:277: error: conflicting types for 'set_bit' [...]/stubdom/../extras/mini-os/include/x86/mini-os/os.h:396: error: previous definition of 'set_bit' was here [...]/stubdom/ioemu/hw/piix4acpi.c:282: error: conflicting types for 'clear_bit' [...]/stubdom/../extras/mini-os/include/x86/mini-os/os.h:414: error: previous definition of 'clear_bit' was here [...]/stubdom/ioemu/hw/piix4acpi.c: In function 'gpe_sts_write': Signed-off-by: Ian Campbell Acked-by: Ian Jackson Committed-by: Ian Jackson --- extras/mini-os/include/x86/os.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'extras') diff --git a/extras/mini-os/include/x86/os.h b/extras/mini-os/include/x86/os.h index 6bd0ebee99..f193865cd2 100644 --- a/extras/mini-os/include/x86/os.h +++ b/extras/mini-os/include/x86/os.h @@ -164,6 +164,7 @@ typedef struct { volatile int counter; } atomic_t; /************************** i386 *******************************/ +#ifdef __INSIDE_MINIOS__ #if defined (__i386__) #define xchg(ptr,v) ((__typeof__(*(ptr)))__xchg((unsigned long)(v),(ptr),sizeof(*(ptr)))) @@ -451,7 +452,7 @@ static __inline__ unsigned long __ffs(unsigned long word) #else /* ifdef __x86_64__ */ #error "Unsupported architecture" #endif - +#endif /* ifdef __INSIDE_MINIOS */ /********************* common i386 and x86_64 ****************************/ struct __synch_xchg_dummy { unsigned long a[100]; }; -- cgit v1.2.3