aboutsummaryrefslogtreecommitdiffstats
path: root/ports/ARM7-LPC214x
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-01-10 15:04:57 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-01-10 15:04:57 +0000
commit98749abfdfc28095eb45db8d594596c13645ed08 (patch)
tree656efb0957c86e9448bb1d3c2ec389b84f44de08 /ports/ARM7-LPC214x
parenta746b895fd7e6be0d430c2fa9624d580b44986c6 (diff)
downloadChibiOS-98749abfdfc28095eb45db8d594596c13645ed08.tar.gz
ChibiOS-98749abfdfc28095eb45db8d594596c13645ed08.tar.bz2
ChibiOS-98749abfdfc28095eb45db8d594596c13645ed08.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@175 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'ports/ARM7-LPC214x')
-rw-r--r--ports/ARM7-LPC214x/GCC/chcore.c10
-rw-r--r--ports/ARM7-LPC214x/GCC/chcore.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/ports/ARM7-LPC214x/GCC/chcore.c b/ports/ARM7-LPC214x/GCC/chcore.c
index fc4c01942..d562a1527 100644
--- a/ports/ARM7-LPC214x/GCC/chcore.c
+++ b/ports/ARM7-LPC214x/GCC/chcore.c
@@ -69,7 +69,7 @@ void chSysUnlock(void) {
}
#endif
-void chSysSwitchI(Context *oldp, Context *newp) {
+void chSysSwitchI(struct Thread *otp, struct Thread *ntp) {
#ifdef THUMB
asm(".p2align 2,, \n\t" \
@@ -80,8 +80,8 @@ void chSysSwitchI(Context *oldp, Context *newp) {
#ifdef CH_CURRP_REGISTER_CACHE
asm("stmfd sp!, {r4, r5, r6, r8, r9, r10, r11, lr} \n\t" \
- "str sp, [r0, #0] \n\t" \
- "ldr sp, [r1, #0] \n\t");
+ "str sp, [r0, #16] \n\t" \
+ "ldr sp, [r1, #16] \n\t");
#ifdef THUMB_PRESENT
asm("ldmfd sp!, {r4, r5, r6, r8, r9, r10, r11, lr} \n\t" \
"bx lr \n\t");
@@ -90,8 +90,8 @@ void chSysSwitchI(Context *oldp, Context *newp) {
#endif /* !THUMB_PRESENT */
#else /* !CH_CURRP_REGISTER_CACHE */
asm("stmfd sp!, {r4, r5, r6, r7, r8, r9, r10, r11, lr} \n\t" \
- "str sp, [r0, #0] \n\t" \
- "ldr sp, [r1, #0] \n\t");
+ "str sp, [r0, #16] \n\t" \
+ "ldr sp, [r1, #16] \n\t");
#ifdef THUMB_PRESENT
asm("ldmfd sp!, {r4, r5, r6, r7, r8, r9, r10, r11, lr} \n\t" \
"bx lr \n\t");
diff --git a/ports/ARM7-LPC214x/GCC/chcore.h b/ports/ARM7-LPC214x/GCC/chcore.h
index 05223170d..624386f15 100644
--- a/ports/ARM7-LPC214x/GCC/chcore.h
+++ b/ports/ARM7-LPC214x/GCC/chcore.h
@@ -122,7 +122,7 @@ extern void chSysUnlock(void);
void _IdleThread(void *p) __attribute__((noreturn));
void chSysHalt(void);
-void chSysSwitchI(Context *oldp, Context *newp);
+void chSysSwitchI(struct Thread *otp, struct Thread *ntp);
void chSysPuts(char *msg);
void threadstart(void);