diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-12-23 17:32:41 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-12-23 17:32:41 +0000 |
commit | 10b6fd31cc5b27540bdde4999060a42de3e44d26 (patch) | |
tree | 96203f9eb5cff73526dd98af4ed20a40080a758a /nuttx/arch/z80/src/z180 | |
parent | 8a547ed6db3b7e17d90c8ebda107cafc98e7723e (diff) | |
download | px4-nuttx-10b6fd31cc5b27540bdde4999060a42de3e44d26.tar.gz px4-nuttx-10b6fd31cc5b27540bdde4999060a42de3e44d26.tar.bz2 px4-nuttx-10b6fd31cc5b27540bdde4999060a42de3e44d26.zip |
Mostly costmetic updates
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5452 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/z80/src/z180')
-rw-r--r-- | nuttx/arch/z80/src/z180/switch.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/nuttx/arch/z80/src/z180/switch.h b/nuttx/arch/z80/src/z180/switch.h index ae80f4f76..7bf851a7c 100644 --- a/nuttx/arch/z80/src/z180/switch.h +++ b/nuttx/arch/z80/src/z180/switch.h @@ -77,9 +77,11 @@ * - savestate holds the previous value of current_state. * - savecpr holds the previous value of current_cpr. * - * TODO: I think this logic is bad... I do not thing that this will really - * handle nested interrupts correctly. What if we are nested and then a - * context switch occurs? current_regs will not be updated correctly! + * NOTE: Nested interrupts are not supported in this implementation. If you want + * to implement nested interrupts, you would have to change the way that + * current_regs/cbr is handled. The savestate/savecbr variables would not work + * for that purpose as implemented here because only the outermost nested + * interrupt can result in a context switch (they can probabaly be deleted). */ #define DECL_SAVESTATE() \ @@ -203,33 +205,30 @@ extern uint8_t current_cbr; #ifndef __ASSEMBLY__ #ifdef __cplusplus -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern +extern "C" +{ #endif /* Defined in z180_copystate.c */ -EXTERN void z180_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src); +void z180_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src); /* Defined in z180_saveusercontext.asm */ -EXTERN int z180_saveusercontext(FAR chipreg_t *regs); +int z180_saveusercontext(FAR chipreg_t *regs); /* Defined in z180_restoreusercontext.asm */ -EXTERN void z180_restoreusercontext(FAR chipreg_t *regs); +void z180_restoreusercontext(FAR chipreg_t *regs); /* Defined in z180_sigsetup.c */ -EXTERN void z180_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs); +void z180_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs); /* Defined in z180_registerdump.c */ -EXTERN void z180_registerdump(void); +void z180_registerdump(void); -#undef EXTERN #ifdef __cplusplus } #endif |