Mostly costmetic updates

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5452 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2012-12-23 17:32:41 +00:00
parent 57820d7d90
commit 7c7a0d4f24
16 changed files with 149 additions and 108 deletions
+6 -9
View File
@@ -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 svn checkout -r5447 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
</pre></ul> </pre></ul>
<p> <p>
<b>Additional new features and extended functionality</b> <b>Additional new features and extended functionality</b>
</p> </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>. 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>
<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>
<li> <li>
Example Windows native builds for STM32F4Discovery, eZ80, z16f, z8, Z80, and Z180. 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> </li>
</ol> </ol>
<p> <p>
These ports uses a GNU arm-nuttx-elf toolchain* under either Linux or Cygwin (with native Windows GNU These ports uses a GNU arm-nuttx-elf toolchain* under either Linux or Cygwin (with native Windows GNU tools or Cygwin-based GNU tools).
tools or Cygwin-based GNU tools).
</p> </p>
<ul> <ul>
<p> <p>
@@ -1999,8 +1997,7 @@ svn checkout -r5447 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
<b>Atmel AT91SAM3U</b>. <b>Atmel AT91SAM3U</b>.
This port uses the <a href="http://www.atmel.com/">Atmel</a> SAM3U-EK This port uses the <a href="http://www.atmel.com/">Atmel</a> SAM3U-EK
development board that features the AT91SAM3U4E MCU. 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 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).
tools or Cygwin-based GNU tools).
</p> </p>
<ul> <ul>
<p> <p>
@@ -2884,7 +2881,7 @@ BFD_ASSERT (*plt_offset != (bfd_vma) -1);
<b>Zilog z16f Microncontroller</b>. <b>Zilog z16f Microncontroller</b>.
This port use the Zilog z16f2800100zcog development kit and the Zilog This port use the Zilog z16f2800100zcog development kit and the Zilog
ZDS-II Windows command line tools. 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> </p>
<ul> <ul>
<p> <p>
@@ -2914,7 +2911,7 @@ BFD_ASSERT (*plt_offset != (bfd_vma) -1);
<p> <p>
Both boards are based on the eZ80F091 part and both use the Zilog ZDS-II Both boards are based on the eZ80F091 part and both use the Zilog ZDS-II
Windows command line tools. Windows command line tools.
The development environment is Cygwin under WinXP. The development environment is either Windows native or Cygwin under Windows.
</p> </p>
<ul> <ul>
<p> <p>
@@ -2946,7 +2943,7 @@ BFD_ASSERT (*plt_offset != (bfd_vma) -1);
</ul> </ul>
<p> <p>
and the Zilog ZDS-II Windows command line tools. 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> </p>
<ul> <ul>
<p> <p>
+15 -9
View File
@@ -10,7 +10,7 @@ README
o Configuring NuttX o Configuring NuttX
- Instantiating "Canned" Configurations - Instantiating "Canned" Configurations
- NuttX Configuration Tool - NuttX Configuration Tool
- NuttX Configuration Tool from DOS - NuttX Configuration Tool under DOS
o Toolchains o Toolchains
- Cross-Development Toolchains - Cross-Development Toolchains
- NuttX Buildroot Toolchain - NuttX Buildroot Toolchain
@@ -292,16 +292,16 @@ NuttX Configuration Tool
install 'mconf', make certain that your PATH variable includes install 'mconf', make certain that your PATH variable includes
a path to that installation directory. 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 Recent versions of NuttX support building NuttX from a native Windows
CMD.exe shell (see "Native Windows Build" below). But kconfig-frontends CMD.exe shell (see "Native Windows Build" below). But kconfig-frontends
is a Linux tool. There have been some successes building a Windows is a Linux tool. There have been some successes building a Windows
native version of the kconfig-frontends tool, but that is not ready native version of the kconfig-frontends tool, but that is not ready
for prime time. 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 1. You can run the configuration tool using Cygwin. However, the
Cygwin Makefile.win will complain so to do this will, you have 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 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. 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 Installing GNUWin32
------------------- -------------------
+5 -3
View File
@@ -79,9 +79,11 @@ void up_doirq(int irq, uint32_t *regs)
uint32_t *savestate; uint32_t *savestate;
/* Nested interrupts are not supported in this implementation. If you want /* Nested interrupts are not supported in this implementation. If you want
* implemented nested interrupts, you would have to (1) change the way that * to implement nested interrupts, you would have to (1) change the way that
* current regs is handled and (2) the design associated with * current_regs is handled and (2) the design associated with
* CONFIG_ARCH_INTERRUPTSTACK. * 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 non-zero indicates that we are processing an interrupt;
+5 -3
View File
@@ -79,9 +79,11 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
uint32_t *savestate; uint32_t *savestate;
/* Nested interrupts are not supported in this implementation. If you want /* Nested interrupts are not supported in this implementation. If you want
* implemented nested interrupts, you would have to (1) change the way that * to implement nested interrupts, you would have to (1) change the way that
* current regs is handled and (2) the design associated with * current_regs is handled and (2) the design associated with
* CONFIG_ARCH_INTERRUPTSTACK. * 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 non-zero indicates that we are processing an interrupt;
+5 -3
View File
@@ -79,9 +79,11 @@ uint8_t *up_doirq(uint8_t irq, uint8_t *regs)
uint8_t *savestate; uint8_t *savestate;
/* Nested interrupts are not supported in this implementation. If you want /* Nested interrupts are not supported in this implementation. If you want
* implemented nested interrupts, you would have to (1) change the way that * to implement nested interrupts, you would have to (1) change the way that
* current regs is handled and (2) the design associated with * current_regs is handled and (2) the design associated with
* CONFIG_ARCH_INTERRUPTSTACK. * 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 non-zero indicates that we are processing an interrupt;
+5 -3
View File
@@ -79,9 +79,11 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
uint32_t *savestate; uint32_t *savestate;
/* Nested interrupts are not supported in this implementation. If you want /* Nested interrupts are not supported in this implementation. If you want
* implemented nested interrupts, you would have to (1) change the way that * to implement nested interrupts, you would have to (1) change the way that
* current regs is handled and (2) the design associated with * current_regs is handled and (2) the design associated with
* CONFIG_ARCH_INTERRUPTSTACK. * 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 non-zero indicates that we are processing an interrupt;
+5 -3
View File
@@ -79,9 +79,11 @@ uint8_t *up_doirq(int irq, uint8_t *regs)
uint8_t *savestate; uint8_t *savestate;
/* Nested interrupts are not supported in this implementation. If you want /* Nested interrupts are not supported in this implementation. If you want
* implemented nested interrupts, you would have to (1) change the way that * to implement nested interrupts, you would have to (1) change the way that
* current regs is handled and (2) the design associated with * current_regs is handled and (2) the design associated with
* CONFIG_ARCH_INTERRUPTSTACK. * 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 non-zero indicates that we are processing an interrupt;
+5 -3
View File
@@ -79,9 +79,11 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
uint32_t *savestate; uint32_t *savestate;
/* Nested interrupts are not supported in this implementation. If you want /* Nested interrupts are not supported in this implementation. If you want
* implemented nested interrupts, you would have to (1) change the way that * to implement nested interrupts, you would have to (1) change the way that
* current regs is handled and (2) the design associated with * current_regs is handled and (2) the design associated with
* CONFIG_ARCH_INTERRUPTSTACK. * 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 non-zero indicates that we are processing an interrupt;
+9
View File
@@ -79,6 +79,15 @@ uint32_t *up_doirq(int irq, uint32_t* regs)
{ {
uint32_t *savestate; 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 /* Current regs non-zero indicates that we are processing
* an interrupt; current_regs is also used to manage * an interrupt; current_regs is also used to manage
* interrupt level context switches. * interrupt level context switches.
+9
View File
@@ -90,6 +90,15 @@ FAR chipreg_t *up_doirq(int irq, FAR chipreg_t *regs)
{ {
FAR chipreg_t *savestate; 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 /* Current regs non-zero indicates that we are processing
* an interrupt; current_regs is also used to manage * an interrupt; current_regs is also used to manage
* interrupt level context switches. * interrupt level context switches.
+3 -3
View File
@@ -34,8 +34,8 @@
* *
************************************************************************************/ ************************************************************************************/
#ifndef __ARCH_Z80_SRC_Z80_CHIP_H #ifndef __ARCH_Z80_INCLUDE_Z80_CHIP_H
#define __ARCH_Z80_SRC_Z80_CHIP_H #define __ARCH_Z80_INCLUDE_Z80_CHIP_H
/************************************************************************************ /************************************************************************************
* Included Files * Included Files
@@ -76,4 +76,4 @@ extern "C" {
#endif #endif
#endif #endif
#endif /* __ARCH_Z80_SRC_Z80_CHIP_H */ #endif /* __ARCH_Z80_INCLUDE_Z80_CHIP_H */
+19 -22
View File
@@ -94,28 +94,26 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" extern "C"
extern "C" { {
#else
#define EXTERN extern
#endif #endif
/* Supplied by chip- or board-specific logic */ /* Supplied by chip- or board-specific logic */
EXTERN void up_irqinitialize(void); void up_irqinitialize(void);
EXTERN int up_timerisr(int irq, FAR chipreg_t *regs); int up_timerisr(int irq, FAR chipreg_t *regs);
#ifdef USE_LOWSERIALINIT #ifdef USE_LOWSERIALINIT
EXTERN void up_lowserialinit(void); void up_lowserialinit(void);
#endif #endif
/* Defined in up_doirq.c */ /* 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 */ /* Define in up_sigdeliver */
EXTERN void up_sigdeliver(void); void up_sigdeliver(void);
/* Defined in CPU-specific logic (only for Z180) */ /* Defined in CPU-specific logic (only for Z180) */
@@ -132,7 +130,7 @@ void up_addregion(void);
/* Defined in up_serial.c */ /* Defined in up_serial.c */
#ifdef USE_SERIALDRIVER #ifdef USE_SERIALDRIVER
EXTERN void up_serialinit(void); void up_serialinit(void);
#else #else
# define up_serialinit() # define up_serialinit()
#endif #endif
@@ -140,7 +138,7 @@ EXTERN void up_serialinit(void);
/* Defined in drivers/lowconsole.c */ /* Defined in drivers/lowconsole.c */
#ifdef CONFIG_DEV_LOWCONSOLE #ifdef CONFIG_DEV_LOWCONSOLE
EXTERN void lowconsole_init(void); void lowconsole_init(void);
#else #else
# define lowconsole_init() # define lowconsole_init()
#endif #endif
@@ -159,14 +157,14 @@ extern void up_puts(const char *str);
/* Defined in up_timerisr.c */ /* Defined in up_timerisr.c */
EXTERN void up_timerinit(void); void up_timerinit(void);
/* Defined in board/up_leds.c */ /* Defined in board/up_leds.c */
#ifdef CONFIG_ARCH_LEDS #ifdef CONFIG_ARCH_LEDS
EXTERN void up_ledinit(void); void up_ledinit(void);
EXTERN void up_ledon(int led); void up_ledon(int led);
EXTERN void up_ledoff(int led); void up_ledoff(int led);
#else #else
# define up_ledinit() # define up_ledinit()
# define up_ledon(led) # define up_ledon(led)
@@ -176,16 +174,16 @@ EXTERN void up_ledoff(int led);
/* Architecture specific hook into the timer interrupt handler */ /* Architecture specific hook into the timer interrupt handler */
#ifdef CONFIG_ARCH_TIMERHOOK #ifdef CONFIG_ARCH_TIMERHOOK
EXTERN void up_timerhook(void); void up_timerhook(void);
#endif #endif
/* Defined in board/up_network.c */ /* Defined in board/up_network.c */
#ifdef CONFIG_NET #ifdef CONFIG_NET
EXTERN int up_netinitialize(void); int up_netinitialize(void);
EXTERN void up_netuninitialize(void); void up_netuninitialize(void);
# ifdef CONFIG_ARCH_MCFILTER # 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 # else
# define up_multicastfilter(dev, mac, enable) # define up_multicastfilter(dev, mac, enable)
# endif # 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) */ /* 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 */ /* Dump stack and registers */
#ifdef CONFIG_ARCH_STACKDUMP #ifdef CONFIG_ARCH_STACKDUMP
EXTERN void up_stackdump(void); void up_stackdump(void);
# define REGISTER_DUMP() _REGISTER_DUMP() # define REGISTER_DUMP() _REGISTER_DUMP()
#else #else
# define up_stackdump() # define up_stackdump()
# define REGISTER_DUMP() # define REGISTER_DUMP()
#endif #endif
#undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
+15 -11
View File
@@ -67,7 +67,14 @@
#define IN_INTERRUPT() (current_regs != NULL) #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() \ #define DECL_SAVESTATE() \
FAR chipreg_t *savestate FAR chipreg_t *savestate
@@ -132,33 +139,30 @@ extern volatile chipreg_t *current_regs;
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" extern "C"
extern "C" { {
#else
#define EXTERN extern
#endif #endif
/* Defined in ez80_copystate.c */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* Defined in ez80_registerdump.c */
EXTERN void ez80_registerdump(void); void ez80_registerdump(void);
#undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
+12 -13
View File
@@ -77,9 +77,11 @@
* - savestate holds the previous value of current_state. * - savestate holds the previous value of current_state.
* - savecpr holds the previous value of current_cpr. * - savecpr holds the previous value of current_cpr.
* *
* TODO: I think this logic is bad... I do not thing that this will really * NOTE: Nested interrupts are not supported in this implementation. If you want
* handle nested interrupts correctly. What if we are nested and then a * to implement nested interrupts, you would have to change the way that
* context switch occurs? current_regs will not be updated correctly! * 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() \ #define DECL_SAVESTATE() \
@@ -203,33 +205,30 @@ extern uint8_t current_cbr;
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" extern "C"
extern "C" { {
#else
#define EXTERN extern
#endif #endif
/* Defined in z180_copystate.c */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* Defined in z180_registerdump.c */
EXTERN void z180_registerdump(void); void z180_registerdump(void);
#undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
+16 -12
View File
@@ -112,7 +112,14 @@
#define IN_INTERRUPT() \ #define IN_INTERRUPT() \
(g_z8irqstate.state != Z8_IRQSTATE_NONE) (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() \ #define DECL_SAVESTATE() \
struct z8_irqstate_s savestate struct z8_irqstate_s savestate
@@ -216,37 +223,34 @@ extern struct z8_irqstate_s g_z8irqstate;
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" extern "C"
extern "C" { {
#else
#define EXTERN extern
#endif #endif
/* Defined in z8_irq.c */ /* Defined in z8_irq.c */
EXTERN void up_maskack_irq(int irq); void up_maskack_irq(int irq);
/* Defined in z8_saveusercontext.asm */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* Defined in z8_registerdump.c */
EXTERN void z8_registerdump(void); void z8_registerdump(void);
#undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
+15 -11
View File
@@ -66,7 +66,14 @@
#define IN_INTERRUPT() (current_regs != NULL) #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() \ #define DECL_SAVESTATE() \
FAR chipreg_t *savestate FAR chipreg_t *savestate
@@ -131,33 +138,30 @@ extern volatile chipreg_t *current_regs;
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" extern "C"
extern "C" { {
#else
#define EXTERN extern
#endif #endif
/* Defined in z80_copystate.c */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* Defined in z80_registerdump.c */
EXTERN void z80_registerdump(void); void z80_registerdump(void);
#undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif