From b83cd4a1dc8b3240f821a23c588c8d7d690f70ae Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 27 Mar 2008 14:42:48 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@250 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- ports/ARM7/chcore.h | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'ports') diff --git a/ports/ARM7/chcore.h b/ports/ARM7/chcore.h index 3604253b5..eed850266 100644 --- a/ports/ARM7/chcore.h +++ b/ports/ARM7/chcore.h @@ -74,8 +74,14 @@ typedef struct { } #ifdef THUMB -extern void chSysLock(void); -extern void chSysUnlock(void); +#ifdef __cplusplus +extern "C" { +#endif + void chSysLock(void); + void chSysUnlock(void); +#ifdef __cplusplus +} +#endif #else /* !THUMB */ #define chSysLock() asm("msr CPSR_c, #0x9F") #define chSysUnlock() asm("msr CPSR_c, #0x1F") @@ -123,11 +129,17 @@ extern void chSysUnlock(void); /* It requires zero bytes, but better be safe.*/ #define IDLE_THREAD_STACK_SIZE 8 -void _IdleThread(void *p) __attribute__((noreturn)); -void chSysHalt(void); -void chSysSwitchI(Thread *otp, Thread *ntp); -void chSysPuts(char *msg); -void threadstart(void); +#ifdef __cplusplus +extern "C" { +#endif + void _IdleThread(void *p) __attribute__((noreturn)); + void chSysHalt(void); + void chSysSwitchI(Thread *otp, Thread *ntp); + void chSysPuts(char *msg); + void threadstart(void); +#ifdef __cplusplus +} +#endif #endif /* _CHCORE_H_ */ -- cgit v1.2.3