summaryrefslogtreecommitdiff
path: root/nuttx/arch/z80/src/z180/switch.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-12-11 22:51:20 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-12-11 22:51:20 +0000
commit72a312c24a6e1c84bc9c9ce850f83c9b01b1b390 (patch)
tree7b8798b99a8b739606c805b7839f4351670dfbf1 /nuttx/arch/z80/src/z180/switch.h
parentf0e320ceb9ba49bc6133547e25c520c2155b38d7 (diff)
downloadpx4-nuttx-72a312c24a6e1c84bc9c9ce850f83c9b01b1b390.tar.gz
px4-nuttx-72a312c24a6e1c84bc9c9ce850f83c9b01b1b390.tar.bz2
px4-nuttx-72a312c24a6e1c84bc9c9ce850f83c9b01b1b390.zip
Fix some early z180 compile errors
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5430 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/z80/src/z180/switch.h')
-rw-r--r--nuttx/arch/z80/src/z180/switch.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/nuttx/arch/z80/src/z180/switch.h b/nuttx/arch/z80/src/z180/switch.h
index aa33bd1e1..ae80f4f76 100644
--- a/nuttx/arch/z80/src/z180/switch.h
+++ b/nuttx/arch/z80/src/z180/switch.h
@@ -42,7 +42,9 @@
************************************************************************************/
#include <nuttx/sched.h>
+
#include <nuttx/arch.h>
+#include <arch/io.h>
#include "z180_iomap.h"
#include "up_internal.h"
@@ -112,13 +114,14 @@
current_regs = savestate; \
if (current_regs) \
{ \
- current_cbr = savecbr; \
+ current_cbr = savecbr; \
} \
else \
{ \
outp(Z180_MMU_CBR, savecbr); \
} \
- }
+ } \
+ while (0)
/* The following macro is used to sample the interrupt state (as a opaque handle) */
@@ -135,9 +138,9 @@
#define SET_IRQCONTEXT(tcb) \
do \
{ \
- if ((tcb)->xcp.cbr.cbr) \
+ if ((tcb)->xcp.cbr) \
{ \
- current_cbr = (tcb)->xcp.cbr->cbr); \
+ current_cbr = (tcb)->xcp.cbr->cbr; \
} \
z180_copystate((FAR chipreg_t*)current_regs, (tcb)->xcp.regs); \
} \
@@ -157,7 +160,7 @@
#define RESTORE_USERCONTEXT(tcb) \
do \
{ \
- if ((tcb)->xcp.cbr.cbr) \
+ if ((tcb)->xcp.cbr) \
{ \
outp(Z180_MMU_CBR, (tcb)->xcp.cbr->cbr); \
} \