From d50ca14a21ef325f1e4e37b1adb0500a194a0561 Mon Sep 17 00:00:00 2001 From: utzig Date: Tue, 8 Jul 2014 19:05:06 +0000 Subject: Fixed indexing of context offset inside thread_t (was chibios's thread_t based...) git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7021 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/nil/ports/AVR/nilcore.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'os/nil/ports/AVR') diff --git a/os/nil/ports/AVR/nilcore.c b/os/nil/ports/AVR/nilcore.c index eb762b00b..8c115c17f 100644 --- a/os/nil/ports/AVR/nilcore.c +++ b/os/nil/ports/AVR/nilcore.c @@ -67,7 +67,7 @@ #if !defined(__DOXYGEN__) __attribute__((naked, weak)) #endif -void port_switch(Thread *ntp, Thread *otp) { +void _port_switch(thread_t *ntp, thread_t *otp) { asm volatile ("push r2"); asm volatile ("push r3"); @@ -90,14 +90,14 @@ void port_switch(Thread *ntp, Thread *otp) { asm volatile ("movw r30, r22"); asm volatile ("in r0, 0x3d"); - asm volatile ("std Z+5, r0"); + asm volatile ("std Z+0, r0"); asm volatile ("in r0, 0x3e"); - asm volatile ("std Z+6, r0"); + asm volatile ("std Z+1, r0"); asm volatile ("movw r30, r24"); - asm volatile ("ldd r0, Z+5"); + asm volatile ("ldd r0, Z+0"); asm volatile ("out 0x3d, r0"); - asm volatile ("ldd r0, Z+6"); + asm volatile ("ldd r0, Z+1"); asm volatile ("out 0x3e, r0"); asm volatile ("pop r29"); -- cgit v1.2.3