aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorutzig <utzig@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-07-08 19:05:06 +0000
committerutzig <utzig@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-07-08 19:05:06 +0000
commitd50ca14a21ef325f1e4e37b1adb0500a194a0561 (patch)
treed250a61b784000abbaf66a55cce5c8846223e48a
parentc4eab50690506d07ac5760c280ba93d0a18911cc (diff)
downloadChibiOS-d50ca14a21ef325f1e4e37b1adb0500a194a0561.tar.gz
ChibiOS-d50ca14a21ef325f1e4e37b1adb0500a194a0561.tar.bz2
ChibiOS-d50ca14a21ef325f1e4e37b1adb0500a194a0561.zip
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
-rw-r--r--os/nil/ports/AVR/nilcore.c10
1 files changed, 5 insertions, 5 deletions
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");