aboutsummaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-12-23 17:32:41 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-12-23 17:32:41 +0000
commitc62d3d93deef9ec14e80c3a96d70f846deeff66e (patch)
tree96203f9eb5cff73526dd98af4ed20a40080a758a /nuttx
parentf2a0267b0724206a9aa20b4c0caba36b3eecc3fe (diff)
downloadpx4-firmware-c62d3d93deef9ec14e80c3a96d70f846deeff66e.tar.gz
px4-firmware-c62d3d93deef9ec14e80c3a96d70f846deeff66e.tar.bz2
px4-firmware-c62d3d93deef9ec14e80c3a96d70f846deeff66e.zip
Mostly costmetic updates
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5452 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/Documentation/NuttX.html15
-rw-r--r--nuttx/README.txt24
-rw-r--r--nuttx/arch/arm/src/arm/up_doirq.c8
-rw-r--r--nuttx/arch/arm/src/armv7-m/up_doirq.c8
-rw-r--r--nuttx/arch/avr/src/avr/up_doirq.c8
-rw-r--r--nuttx/arch/avr/src/avr32/up_doirq.c8
-rw-r--r--nuttx/arch/hc/src/common/up_doirq.c8
-rw-r--r--nuttx/arch/mips/src/mips32/up_doirq.c8
-rw-r--r--nuttx/arch/sh/src/common/up_doirq.c9
-rw-r--r--nuttx/arch/z16/src/common/up_doirq.c9
-rw-r--r--nuttx/arch/z80/include/z80/chip.h6
-rw-r--r--nuttx/arch/z80/src/common/up_internal.h41
-rw-r--r--nuttx/arch/z80/src/ez80/switch.h26
-rw-r--r--nuttx/arch/z80/src/z180/switch.h25
-rw-r--r--nuttx/arch/z80/src/z8/switch.h28
-rw-r--r--nuttx/arch/z80/src/z80/switch.h26
16 files changed, 149 insertions, 108 deletions
diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html
index f48994bab..84f298d3a 100644
--- a/nuttx/Documentation/NuttX.html
+++ b/nuttx/Documentation/NuttX.html
@@ -1078,7 +1078,6 @@ svn checkout -r5447 svn://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
svn checkout -r5447 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
</pre></ul>
-
<p>
<b>Additional new features and extended functionality</b>
</p>
@@ -1244,7 +1243,7 @@ svn checkout -r5447 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
This build: (1) Uses all Windows style paths, (2) Uses primarily Windows batch commands from <code>CMD.exe</code>, with (3) a few extensions from <i>GNUWin32</i>.
</p>
<p>
- This capability should still be considered a work in progress because: (1) it has not been verfied on all targets and tools, and (2) still lacks some of the creature-comforts of the more mature environments (like a function <code>configure.sh</code> script and <code>make menuconfig</code> support).
+ This capability should still be considered a work in progress because: (1) It has not been verfied on all targets and tools, and (2) it still lacks some of the creature-comforts of the more mature environments (like a functional <code>configure.sh</code> script and <code>make menuconfig</code> support).
</li>
<li>
Example Windows native builds for STM32F4Discovery, eZ80, z16f, z8, Z80, and Z180.
@@ -1890,8 +1889,7 @@ svn checkout -r5447 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
</li>
</ol>
<p>
- These ports uses a GNU arm-nuttx-elf toolchain* under either Linux or Cygwin (with native Windows GNU
- tools or Cygwin-based GNU tools).
+ These ports uses a GNU arm-nuttx-elf toolchain* under either Linux or Cygwin (with native Windows GNU tools or Cygwin-based GNU tools).
</p>
<ul>
<p>
@@ -1999,8 +1997,7 @@ svn checkout -r5447 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
<b>Atmel AT91SAM3U</b>.
This port uses the <a href="http://www.atmel.com/">Atmel</a> SAM3U-EK
development board that features the AT91SAM3U4E MCU.
- This port uses a GNU arm-nuttx-elf or arm-eabi toolchain* under either Linux or Cygwin (with native Windows GNU
- tools or Cygwin-based GNU tools).
+ This port uses a GNU arm-nuttx-elf or arm-eabi toolchain* under either Linux or Cygwin (with native Windows GNU tools or Cygwin-based GNU tools).
</p>
<ul>
<p>
@@ -2884,7 +2881,7 @@ BFD_ASSERT (*plt_offset != (bfd_vma) -1);
<b>Zilog z16f Microncontroller</b>.
This port use the Zilog z16f2800100zcog development kit and the Zilog
ZDS-II Windows command line tools.
- The development environment is Cygwin under WinXP.
+ The development environment is either Windows native or Cygwin under Windows.
</p>
<ul>
<p>
@@ -2914,7 +2911,7 @@ BFD_ASSERT (*plt_offset != (bfd_vma) -1);
<p>
Both boards are based on the eZ80F091 part and both use the Zilog ZDS-II
Windows command line tools.
- The development environment is Cygwin under WinXP.
+ The development environment is either Windows native or Cygwin under Windows.
</p>
<ul>
<p>
@@ -2946,7 +2943,7 @@ BFD_ASSERT (*plt_offset != (bfd_vma) -1);
</ul>
<p>
and the Zilog ZDS-II Windows command line tools.
- The development environment is Cygwin under WinXP.
+ The development environment is either Windows native or Cygwin under Windows.
</p>
<ul>
<p>
diff --git a/nuttx/README.txt b/nuttx/README.txt
index b71012cd8..dc3c9fb67 100644
--- a/nuttx/README.txt
+++ b/nuttx/README.txt
@@ -10,7 +10,7 @@ README
o Configuring NuttX
- Instantiating "Canned" Configurations
- NuttX Configuration Tool
- - NuttX Configuration Tool from DOS
+ - NuttX Configuration Tool under DOS
o Toolchains
- Cross-Development Toolchains
- NuttX Buildroot Toolchain
@@ -292,16 +292,16 @@ NuttX Configuration Tool
install 'mconf', make certain that your PATH variable includes
a path to that installation directory.
-NuttX Configuration Tool from DOS
----------------------------------
+NuttX Configuration Tool under DOS
+----------------------------------
-Recent versions of NuttX support building NuttX from a native Windows
-CMD.exe shell (see "Native Windows Build" below). But kconfig-frontends
-is a Linux tool. There have been some successes building a Windows
-native version of the kconfig-frontends tool, but that is not ready
-for prime time.
+ Recent versions of NuttX support building NuttX from a native Windows
+ CMD.exe shell (see "Native Windows Build" below). But kconfig-frontends
+ is a Linux tool. There have been some successes building a Windows
+ native version of the kconfig-frontends tool, but that is not ready
+ for prime time.
-At this point, there are only a few options for the Windows user:
+ At this point, there are only a few options for the Windows user:
1. You can run the configuration tool using Cygwin. However, the
Cygwin Makefile.win will complain so to do this will, you have
@@ -566,6 +566,12 @@ Native Windows Build
http://www.mingw.org/. If you are using GNUWin32, then it is recommended
the you not install the optional MSYS components as there may be conflicts.
+ This capability should still be considered a work in progress because:
+ (1) It has not been verfied on all targets and tools, and
+ (2) itstill lacks some of the creature-comforts of the more mature environments
+ (like a functional configure.sh script and 'make menuconfig' support.
+ See the section "NuttX Configuration Tool under DOS" above).
+
Installing GNUWin32
-------------------
diff --git a/nuttx/arch/arm/src/arm/up_doirq.c b/nuttx/arch/arm/src/arm/up_doirq.c
index c82587fff..7cd1a6a1b 100644
--- a/nuttx/arch/arm/src/arm/up_doirq.c
+++ b/nuttx/arch/arm/src/arm/up_doirq.c
@@ -79,9 +79,11 @@ void up_doirq(int irq, uint32_t *regs)
uint32_t *savestate;
/* Nested interrupts are not supported in this implementation. If you want
- * implemented nested interrupts, you would have to (1) change the way that
- * current regs is handled and (2) the design associated with
- * CONFIG_ARCH_INTERRUPTSTACK.
+ * to implement nested interrupts, you would have to (1) change the way that
+ * current_regs is handled and (2) the design associated with
+ * CONFIG_ARCH_INTERRUPTSTACK. The savestate variable will not work for
+ * that purpose as implemented here because only the outermost nested
+ * interrupt can result in a context switch (it can probably be deleted).
*/
/* Current regs non-zero indicates that we are processing an interrupt;
diff --git a/nuttx/arch/arm/src/armv7-m/up_doirq.c b/nuttx/arch/arm/src/armv7-m/up_doirq.c
index 375054fba..6063f9ca1 100644
--- a/nuttx/arch/arm/src/armv7-m/up_doirq.c
+++ b/nuttx/arch/arm/src/armv7-m/up_doirq.c
@@ -79,9 +79,11 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
uint32_t *savestate;
/* Nested interrupts are not supported in this implementation. If you want
- * implemented nested interrupts, you would have to (1) change the way that
- * current regs is handled and (2) the design associated with
- * CONFIG_ARCH_INTERRUPTSTACK.
+ * to implement nested interrupts, you would have to (1) change the way that
+ * current_regs is handled and (2) the design associated with
+ * CONFIG_ARCH_INTERRUPTSTACK. The savestate variable will not work for
+ * that purpose as implemented here because only the outermost nested
+ * interrupt can result in a context switch (it can probably be deleted).
*/
/* Current regs non-zero indicates that we are processing an interrupt;
diff --git a/nuttx/arch/avr/src/avr/up_doirq.c b/nuttx/arch/avr/src/avr/up_doirq.c
index e38bf7fa8..7533d2159 100644
--- a/nuttx/arch/avr/src/avr/up_doirq.c
+++ b/nuttx/arch/avr/src/avr/up_doirq.c
@@ -79,9 +79,11 @@ uint8_t *up_doirq(uint8_t irq, uint8_t *regs)
uint8_t *savestate;
/* Nested interrupts are not supported in this implementation. If you want
- * implemented nested interrupts, you would have to (1) change the way that
- * current regs is handled and (2) the design associated with
- * CONFIG_ARCH_INTERRUPTSTACK.
+ * to implement nested interrupts, you would have to (1) change the way that
+ * current_regs is handled and (2) the design associated with
+ * CONFIG_ARCH_INTERRUPTSTACK. The savestate variable will not work for
+ * that purpose as implemented here because only the outermost nested
+ * interrupt can result in a context switch (it can probably be deleted).
*/
/* Current regs non-zero indicates that we are processing an interrupt;
diff --git a/nuttx/arch/avr/src/avr32/up_doirq.c b/nuttx/arch/avr/src/avr32/up_doirq.c
index 7ade35fad..2d4a5e14a 100644
--- a/nuttx/arch/avr/src/avr32/up_doirq.c
+++ b/nuttx/arch/avr/src/avr32/up_doirq.c
@@ -79,9 +79,11 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
uint32_t *savestate;
/* Nested interrupts are not supported in this implementation. If you want
- * implemented nested interrupts, you would have to (1) change the way that
- * current regs is handled and (2) the design associated with
- * CONFIG_ARCH_INTERRUPTSTACK.
+ * to implement nested interrupts, you would have to (1) change the way that
+ * current_regs is handled and (2) the design associated with
+ * CONFIG_ARCH_INTERRUPTSTACK. The savestate variable will not work for
+ * that purpose as implemented here because only the outermost nested
+ * interrupt can result in a context switch (it can probably be deleted).
*/
/* Current regs non-zero indicates that we are processing an interrupt;
diff --git a/nuttx/arch/hc/src/common/up_doirq.c b/nuttx/arch/hc/src/common/up_doirq.c
index d03b007df..4a56dedbd 100644
--- a/nuttx/arch/hc/src/common/up_doirq.c
+++ b/nuttx/arch/hc/src/common/up_doirq.c
@@ -79,9 +79,11 @@ uint8_t *up_doirq(int irq, uint8_t *regs)
uint8_t *savestate;
/* Nested interrupts are not supported in this implementation. If you want
- * implemented nested interrupts, you would have to (1) change the way that
- * current regs is handled and (2) the design associated with
- * CONFIG_ARCH_INTERRUPTSTACK.
+ * to implement nested interrupts, you would have to (1) change the way that
+ * current_regs is handled and (2) the design associated with
+ * CONFIG_ARCH_INTERRUPTSTACK. The savestate variable will not work for
+ * that purpose as implemented here because only the outermost nested
+ * interrupt can result in a context switch (it can probably be deleted).
*/
/* Current regs non-zero indicates that we are processing an interrupt;
diff --git a/nuttx/arch/mips/src/mips32/up_doirq.c b/nuttx/arch/mips/src/mips32/up_doirq.c
index 29cdf9c60..b963881e3 100644
--- a/nuttx/arch/mips/src/mips32/up_doirq.c
+++ b/nuttx/arch/mips/src/mips32/up_doirq.c
@@ -79,9 +79,11 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
uint32_t *savestate;
/* Nested interrupts are not supported in this implementation. If you want
- * implemented nested interrupts, you would have to (1) change the way that
- * current regs is handled and (2) the design associated with
- * CONFIG_ARCH_INTERRUPTSTACK.
+ * to implement nested interrupts, you would have to (1) change the way that
+ * current_regs is handled and (2) the design associated with
+ * CONFIG_ARCH_INTERRUPTSTACK. The savestate variable will not work for
+ * that purpose as implemented here because only the outermost nested
+ * interrupt can result in a context switch (it can probably be deleted).
*/
/* Current regs non-zero indicates that we are processing an interrupt;
diff --git a/nuttx/arch/sh/src/common/up_doirq.c b/nuttx/arch/sh/src/common/up_doirq.c
index 717196682..185fa9684 100644
--- a/nuttx/arch/sh/src/common/up_doirq.c
+++ b/nuttx/arch/sh/src/common/up_doirq.c
@@ -79,6 +79,15 @@ uint32_t *up_doirq(int irq, uint32_t* regs)
{
uint32_t *savestate;
+ /* Nested interrupts are not supported in this implementation. If
+ * you want to implement nested interrupts, you would have to (1)
+ * change the way that current_regs is handled and (2) the design
+ * associated with CONFIG_ARCH_INTERRUPTSTACK. The savestate
+ * variable will not work for that purpose as implemented here
+ * because only the outermost nested interrupt can result in a
+ * context switch (it can probably be deleted).
+ */
+
/* Current regs non-zero indicates that we are processing
* an interrupt; current_regs is also used to manage
* interrupt level context switches.
diff --git a/nuttx/arch/z16/src/common/up_doirq.c b/nuttx/arch/z16/src/common/up_doirq.c
index 670e6985d..9964f4432 100644
--- a/nuttx/arch/z16/src/common/up_doirq.c
+++ b/nuttx/arch/z16/src/common/up_doirq.c
@@ -90,6 +90,15 @@ FAR chipreg_t *up_doirq(int irq, FAR chipreg_t *regs)
{
FAR chipreg_t *savestate;
+ /* Nested interrupts are not supported in this implementation. If
+ * you want to implement nested interrupts, you would have to (1) change
+ * the way that current_regs is handled and (2) the design associated
+ * with CONFIG_ARCH_INTERRUPTSTACK. The savestate variable will not
+ * work for that purpose as implemented here because only the outermost
+ * nested interrupt can result in a context switch (it can probably be
+ * deleted).
+ */
+
/* Current regs non-zero indicates that we are processing
* an interrupt; current_regs is also used to manage
* interrupt level context switches.
diff --git a/nuttx/arch/z80/include/z80/chip.h b/nuttx/arch/z80/include/z80/chip.h
index 5c0c61166..c355eb788 100644
--- a/nuttx/arch/z80/include/z80/chip.h
+++ b/nuttx/arch/z80/include/z80/chip.h
@@ -34,8 +34,8 @@
*
************************************************************************************/
-#ifndef __ARCH_Z80_SRC_Z80_CHIP_H
-#define __ARCH_Z80_SRC_Z80_CHIP_H
+#ifndef __ARCH_Z80_INCLUDE_Z80_CHIP_H
+#define __ARCH_Z80_INCLUDE_Z80_CHIP_H
/************************************************************************************
* Included Files
@@ -76,4 +76,4 @@ extern "C" {
#endif
#endif
-#endif /* __ARCH_Z80_SRC_Z80_CHIP_H */
+#endif /* __ARCH_Z80_INCLUDE_Z80_CHIP_H */
diff --git a/nuttx/arch/z80/src/common/up_internal.h b/nuttx/arch/z80/src/common/up_internal.h
index def13b546..5f1750b64 100644
--- a/nuttx/arch/z80/src/common/up_internal.h
+++ b/nuttx/arch/z80/src/common/up_internal.h
@@ -94,28 +94,26 @@
#ifndef __ASSEMBLY__
#ifdef __cplusplus
-#define EXTERN extern "C"
-extern "C" {
-#else
-#define EXTERN extern
+extern "C"
+{
#endif
/* Supplied by chip- or board-specific logic */
-EXTERN void up_irqinitialize(void);
-EXTERN int up_timerisr(int irq, FAR chipreg_t *regs);
+void up_irqinitialize(void);
+int up_timerisr(int irq, FAR chipreg_t *regs);
#ifdef USE_LOWSERIALINIT
-EXTERN void up_lowserialinit(void);
+void up_lowserialinit(void);
#endif
/* Defined in up_doirq.c */
-EXTERN FAR chipreg_t *up_doirq(uint8_t irq, FAR chipreg_t *regs);
+FAR chipreg_t *up_doirq(uint8_t irq, FAR chipreg_t *regs);
/* Define in up_sigdeliver */
-EXTERN void up_sigdeliver(void);
+void up_sigdeliver(void);
/* Defined in CPU-specific logic (only for Z180) */
@@ -132,7 +130,7 @@ void up_addregion(void);
/* Defined in up_serial.c */
#ifdef USE_SERIALDRIVER
-EXTERN void up_serialinit(void);
+void up_serialinit(void);
#else
# define up_serialinit()
#endif
@@ -140,7 +138,7 @@ EXTERN void up_serialinit(void);
/* Defined in drivers/lowconsole.c */
#ifdef CONFIG_DEV_LOWCONSOLE
-EXTERN void lowconsole_init(void);
+void lowconsole_init(void);
#else
# define lowconsole_init()
#endif
@@ -159,14 +157,14 @@ extern void up_puts(const char *str);
/* Defined in up_timerisr.c */
-EXTERN void up_timerinit(void);
+void up_timerinit(void);
/* Defined in board/up_leds.c */
#ifdef CONFIG_ARCH_LEDS
-EXTERN void up_ledinit(void);
-EXTERN void up_ledon(int led);
-EXTERN void up_ledoff(int led);
+void up_ledinit(void);
+void up_ledon(int led);
+void up_ledoff(int led);
#else
# define up_ledinit()
# define up_ledon(led)
@@ -176,16 +174,16 @@ EXTERN void up_ledoff(int led);
/* Architecture specific hook into the timer interrupt handler */
#ifdef CONFIG_ARCH_TIMERHOOK
-EXTERN void up_timerhook(void);
+void up_timerhook(void);
#endif
/* Defined in board/up_network.c */
#ifdef CONFIG_NET
-EXTERN int up_netinitialize(void);
-EXTERN void up_netuninitialize(void);
+int up_netinitialize(void);
+void up_netuninitialize(void);
# ifdef CONFIG_ARCH_MCFILTER
-EXTERN int up_multicastfilter(FAR struct uip_driver_s *dev, FAR uint8_t *mac, bool enable);
+int up_multicastfilter(FAR struct uip_driver_s *dev, FAR uint8_t *mac, bool enable);
# else
# define up_multicastfilter(dev, mac, enable)
# endif
@@ -197,19 +195,18 @@ EXTERN int up_multicastfilter(FAR struct uip_driver_s *dev, FAR uint8_t *mac, bo
/* Return the current value of the stack pointer (used in stack dump logic) */
-EXTERN uint16_t up_getsp(void);
+uint16_t up_getsp(void);
/* Dump stack and registers */
#ifdef CONFIG_ARCH_STACKDUMP
-EXTERN void up_stackdump(void);
+void up_stackdump(void);
# define REGISTER_DUMP() _REGISTER_DUMP()
#else
# define up_stackdump()
# define REGISTER_DUMP()
#endif
-#undef EXTERN
#ifdef __cplusplus
}
#endif
diff --git a/nuttx/arch/z80/src/ez80/switch.h b/nuttx/arch/z80/src/ez80/switch.h
index 0bac6aed1..0970b25ce 100644
--- a/nuttx/arch/z80/src/ez80/switch.h
+++ b/nuttx/arch/z80/src/ez80/switch.h
@@ -67,7 +67,14 @@
#define IN_INTERRUPT() (current_regs != NULL)
-/* The following macro is used when the system enters interrupt handling logic */
+/* The following macro is used when the system enters interrupt handling logic
+ *
+ * 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 is handled. The savestate variable would not work for
+ * that purpose as implemented here because only the outermost nested
+ * interrupt can result in a context switch (it can probably be deleted).
+ */
#define DECL_SAVESTATE() \
FAR chipreg_t *savestate
@@ -132,33 +139,30 @@ extern volatile chipreg_t *current_regs;
#ifndef __ASSEMBLY__
#ifdef __cplusplus
-#define EXTERN extern "C"
-extern "C" {
-#else
-#define EXTERN extern
+extern "C"
+{
#endif
/* Defined in ez80_copystate.c */
-EXTERN void ez80_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src);
+void ez80_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src);
/* Defined in ez80_saveusercontext.asm */
-EXTERN int ez80_saveusercontext(FAR chipreg_t *regs);
+int ez80_saveusercontext(FAR chipreg_t *regs);
/* Defined in ez80_restorecontext.asm */
-EXTERN void ez80_restorecontext(FAR chipreg_t *regs);
+void ez80_restorecontext(FAR chipreg_t *regs);
/* Defined in ez80_sigsetup.c */
-EXTERN void ez80_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, chipreg_t *regs);
+void ez80_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, chipreg_t *regs);
/* Defined in ez80_registerdump.c */
-EXTERN void ez80_registerdump(void);
+void ez80_registerdump(void);
-#undef EXTERN
#ifdef __cplusplus
}
#endif
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
diff --git a/nuttx/arch/z80/src/z8/switch.h b/nuttx/arch/z80/src/z8/switch.h
index 45089947c..17f15b6da 100644
--- a/nuttx/arch/z80/src/z8/switch.h
+++ b/nuttx/arch/z80/src/z8/switch.h
@@ -112,7 +112,14 @@
#define IN_INTERRUPT() \
(g_z8irqstate.state != Z8_IRQSTATE_NONE)
-/* The following macro is used when the system enters interrupt handling logic */
+/* The following macro is used when the system enters interrupt handling logic
+ *
+ * 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 is handled. The savestate variable would not work for
+ * that purpose as implemented here because only the outermost nested
+ * interrupt can result in a context switch (it can probably be deleted).
+ */
#define DECL_SAVESTATE() \
struct z8_irqstate_s savestate
@@ -216,37 +223,34 @@ extern struct z8_irqstate_s g_z8irqstate;
#ifndef __ASSEMBLY__
#ifdef __cplusplus
-#define EXTERN extern "C"
-extern "C" {
-#else
-#define EXTERN extern
+extern "C"
+{
#endif
/* Defined in z8_irq.c */
-EXTERN void up_maskack_irq(int irq);
+void up_maskack_irq(int irq);
/* Defined in z8_saveusercontext.asm */
-EXTERN int z8_saveusercontext(FAR chipreg_t *regs);
+int z8_saveusercontext(FAR chipreg_t *regs);
/* Defined in z8_saveirqcontext.c */
-EXTERN void z8_saveirqcontext(FAR chipreg_t *regs);
+void z8_saveirqcontext(FAR chipreg_t *regs);
/* Defined in z8_restorecontext.asm */
-EXTERN void z8_restorecontext(FAR chipreg_t *regs);
+void z8_restorecontext(FAR chipreg_t *regs);
/* Defined in z8_sigsetup.c */
-EXTERN void z8_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs);
+void z8_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs);
/* Defined in z8_registerdump.c */
-EXTERN void z8_registerdump(void);
+void z8_registerdump(void);
-#undef EXTERN
#ifdef __cplusplus
}
#endif
diff --git a/nuttx/arch/z80/src/z80/switch.h b/nuttx/arch/z80/src/z80/switch.h
index 3732a32a3..4a49c70ef 100644
--- a/nuttx/arch/z80/src/z80/switch.h
+++ b/nuttx/arch/z80/src/z80/switch.h
@@ -66,7 +66,14 @@
#define IN_INTERRUPT() (current_regs != NULL)
-/* The following macro is used when the system enters interrupt handling logic */
+/* The following macro is used when the system enters interrupt handling logic
+ *
+ * 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 is handled. The savestate variable would not work for
+ * that purpose as implemented here because only the outermost nested
+ * interrupt can result in a context switch (it can probably be deleted).
+ */
#define DECL_SAVESTATE() \
FAR chipreg_t *savestate
@@ -131,33 +138,30 @@ extern volatile chipreg_t *current_regs;
#ifndef __ASSEMBLY__
#ifdef __cplusplus
-#define EXTERN extern "C"
-extern "C" {
-#else
-#define EXTERN extern
+extern "C"
+{
#endif
/* Defined in z80_copystate.c */
-EXTERN void z80_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src);
+void z80_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src);
/* Defined in z80_saveusercontext.asm */
-EXTERN int z80_saveusercontext(FAR chipreg_t *regs);
+int z80_saveusercontext(FAR chipreg_t *regs);
/* Defined in z80_restoreusercontext.asm */
-EXTERN void z80_restoreusercontext(FAR chipreg_t *regs);
+void z80_restoreusercontext(FAR chipreg_t *regs);
/* Defined in z80_sigsetup.c */
-EXTERN void z80_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs);
+void z80_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs);
/* Defined in z80_registerdump.c */
-EXTERN void z80_registerdump(void);
+void z80_registerdump(void);
-#undef EXTERN
#ifdef __cplusplus
}
#endif