diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html
index 276ae22a7f..5bc50161ab 100644
--- a/Documentation/NuttX.html
+++ b/Documentation/NuttX.html
@@ -3634,13 +3634,13 @@ Mem: 29232 5920 23312 23312
problems because of SDCC compiler differences.
Refer to the NuttX board README file for further information.
-
- Obsoleted.
- This architecture has been obsoleted.
- The code has been moved out of the source tree an can now be found in Obsoleted directory.
- This support was obsoleted because (1) the architecture limitations of the 8051 family make ongoing support too difficult, and (2) although the basic port was marginally functional, it has never really been demonstrated convincingly in any application.
-
+
+ Obsoleted.
+ This architecture has been obsoleted.
+ The code has been moved out of the NuttX source tree but can still be found be found in Obsoleted directory.
+ This support was obsoleted because (1) the architecture limitations of the 8051 family make ongoing development of more advanced NuttX features too difficult, and (2) although the basic port was marginally functional, it has never really been demonstrated convincingly in any application.
+
diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html
index 07996d513f..a2d1d08844 100644
--- a/Documentation/NuttxPortingGuide.html
+++ b/Documentation/NuttxPortingGuide.html
@@ -1870,7 +1870,7 @@ The system can be re-made subsequently by just typing make.
Description.
Allocate a stack frame in the TCB's stack to hold thread-specific data.
- This function may be called anytime after up_create_stack() or up_use_stack() have been called but before the task has been started.
+ This function may be called any time after up_create_stack() or up_use_stack() have been called but before the task has been started.
Thread data may be kept in the stack (instead of in the TCB) if it is accessed by the user code directly.
@@ -1889,9 +1889,6 @@ The system can be re-made subsequently by just typing make.
This will still be the initial value of the stack pointer when the task is started.
-
- This API is NOT required if CONFIG_BUILD_PROTECTED and CONFIG_BUILD_KERNEL are undefined.
-
Input Parameters:
-
diff --git a/arch/arm/src/a1x/Make.defs b/arch/arm/src/a1x/Make.defs
index 6c53ce0e84..17aa9bbe24 100644
--- a/arch/arm/src/a1x/Make.defs
+++ b/arch/arm/src/a1x/Make.defs
@@ -62,7 +62,7 @@ endif
CMN_CSRCS = up_initialize.c up_idle.c up_interruptcontext.c up_exit.c
CMN_CSRCS += up_createstack.c up_releasestack.c up_usestack.c up_vfork.c
-CMN_CSRCS += up_puts.c up_mdelay.c up_udelay.c
+CMN_CSRCS += up_puts.c up_mdelay.c up_stackframe.c up_udelay.c
CMN_CSRCS += up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
CMN_CSRCS += arm_assert.c arm_blocktask.c arm_copyfullstate.c arm_dataabort.c
@@ -83,7 +83,7 @@ CMN_CSRCS += arm_va2pte.c
endif
ifeq ($(CONFIG_BUILD_KERNEL),y)
-CMN_CSRCS += up_task_start.c up_pthread_start.c up_stackframe.c
+CMN_CSRCS += up_task_start.c up_pthread_start.c
endif
ifeq ($(CONFIG_ARCH_ADDRENV),y)
diff --git a/arch/arm/src/c5471/Make.defs b/arch/arm/src/c5471/Make.defs
index 379d9123d9..388ce9c183 100644
--- a/arch/arm/src/c5471/Make.defs
+++ b/arch/arm/src/c5471/Make.defs
@@ -35,14 +35,15 @@
HEAD_ASRC = up_nommuhead.S
-CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S vfork.S
-CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copyfullstate.c \
- up_createstack.c up_dataabort.c up_mdelay.c up_udelay.c up_doirq.c \
- up_exit.c up_idle.c up_initialize.c up_initialstate.c \
- up_interruptcontext.c up_prefetchabort.c up_releasepending.c \
- up_releasestack.c up_reprioritizertr.c up_schedulesigaction.c \
- up_sigdeliver.c up_syscall.c up_unblocktask.c \
- up_undefinedinsn.c up_usestack.c up_vfork.c
+CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S vfork.S
+
+CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copyfullstate.c
+CMN_CSRCS += up_createstack.c up_dataabort.c up_mdelay.c up_udelay.c up_doirq.c
+CMN_CSRCS += up_exit.c up_idle.c up_initialize.c up_initialstate.c
+CMN_CSRCS += up_interruptcontext.c up_prefetchabort.c up_releasepending.c
+CMN_CSRCS += up_releasestack.c up_reprioritizertr.c up_schedulesigaction.c
+CMN_CSRCS += up_sigdeliver.c up_stackframe.c up_syscall.c up_unblocktask.c
+CMN_CSRCS += up_undefinedinsn.c up_usestack.c up_vfork.c
ifeq ($(CONFIG_ELF),y)
CMN_CSRCS += up_elf.c
diff --git a/arch/arm/src/calypso/Make.defs b/arch/arm/src/calypso/Make.defs
index a50ee62d44..9b5a2c9ab7 100644
--- a/arch/arm/src/calypso/Make.defs
+++ b/arch/arm/src/calypso/Make.defs
@@ -45,7 +45,7 @@ CMN_CSRCS += up_createstack.c up_dataabort.c up_mdelay.c up_udelay.c
CMN_CSRCS += up_doirq.c up_exit.c up_idle.c up_initialstate.c up_initialize.c
CMN_CSRCS += up_interruptcontext.c up_prefetchabort.c up_releasepending.c
CMN_CSRCS += up_releasestack.c up_reprioritizertr.c up_schedulesigaction.c
-CMN_CSRCS += up_sigdeliver.c up_syscall.c up_unblocktask.c
+CMN_CSRCS += up_sigdeliver.c up_stackframe.c up_syscall.c up_unblocktask.c
CMN_CSRCS += up_undefinedinsn.c up_usestack.c calypso_power.c up_vfork.c
ifeq ($(CONFIG_ELF),y)
diff --git a/arch/arm/src/dm320/Make.defs b/arch/arm/src/dm320/Make.defs
index 36409f378e..d38a6ac9d2 100644
--- a/arch/arm/src/dm320/Make.defs
+++ b/arch/arm/src/dm320/Make.defs
@@ -35,15 +35,16 @@
HEAD_ASRC = up_head.S
-CMN_ASRCS = up_cache.S up_fullcontextrestore.S up_saveusercontext.S \
- up_vectors.S up_vectoraddrexcptn.S up_vectortab.S vfork.S
-CMN_CSRCS = up_assert.c up_blocktask.c up_copyfullstate.c up_createstack.c \
- up_dataabort.c up_mdelay.c up_udelay.c up_exit.c up_idle.c \
- up_initialize.c up_initialstate.c up_interruptcontext.c \
- up_prefetchabort.c up_releasepending.c up_releasestack.c \
- up_reprioritizertr.c up_schedulesigaction.c \
- up_sigdeliver.c up_syscall.c up_unblocktask.c \
- up_undefinedinsn.c up_usestack.c up_vfork.c
+CMN_ASRCS = up_cache.S up_fullcontextrestore.S up_saveusercontext.S
+CMN_ASRCS += up_vectors.S up_vectoraddrexcptn.S up_vectortab.S vfork.S
+
+CMN_CSRCS = up_assert.c up_blocktask.c up_copyfullstate.c up_createstack.c
+CMN_CSRCS += up_dataabort.c up_mdelay.c up_udelay.c up_exit.c up_idle.c
+CMN_CSRCS += up_initialize.c up_initialstate.c up_interruptcontext.c
+CMN_CSRCS += up_prefetchabort.c up_releasepending.c up_releasestack.c
+CMN_CSRCS += up_reprioritizertr.c up_schedulesigaction.c
+CMN_CSRCS += up_sigdeliver.c up_stackframe.c up_syscall.c up_unblocktask.c
+CMN_CSRCS += up_undefinedinsn.c up_usestack.c up_vfork.c
ifeq ($(CONFIG_ELF),y)
CMN_CSRCS += up_elf.c
@@ -53,9 +54,10 @@ ifeq ($(CONFIG_DEBUG_STACK),y)
CMN_CSRCS += up_checkstack.c
endif
-CHIP_ASRCS = dm320_lowputc.S dm320_restart.S
-CHIP_CSRCS = dm320_allocateheap.c dm320_boot.c dm320_decodeirq.c \
- dm320_irq.c dm320_serial.c dm320_framebuffer.c
+CHIP_ASRCS = dm320_lowputc.S dm320_restart.S
+
+CHIP_CSRCS = dm320_allocateheap.c dm320_boot.c dm320_decodeirq.c
+CHIP_CSRCS += dm320_irq.c dm320_serial.c dm320_framebuffer.c
ifneq ($(CONFIG_SCHED_TICKLESS),y)
CHIP_CSRCS += dm320_timerisr.c
diff --git a/arch/arm/src/imx/Make.defs b/arch/arm/src/imx/Make.defs
index f8cd8cd7c3..262e34c763 100644
--- a/arch/arm/src/imx/Make.defs
+++ b/arch/arm/src/imx/Make.defs
@@ -35,15 +35,15 @@
HEAD_ASRC = up_head.S
-CMN_ASRCS = up_cache.S up_fullcontextrestore.S up_saveusercontext.S \
- up_vectors.S up_vectoraddrexcptn.S up_vectortab.S vfork.S
-CMN_CSRCS = up_assert.c up_blocktask.c up_copyfullstate.c up_createstack.c \
- up_dataabort.c up_mdelay.c up_udelay.c up_exit.c up_idle.c \
- up_initialize.c up_initialstate.c up_interruptcontext.c \
- up_prefetchabort.c up_releasepending.c up_releasestack.c \
- up_reprioritizertr.c up_schedulesigaction.c \
- up_sigdeliver.c up_syscall.c up_unblocktask.c \
- up_undefinedinsn.c up_usestack.c up_vfork.c
+CMN_ASRCS = up_cache.S up_fullcontextrestore.S up_saveusercontext.S
+CMN_ASRCS += up_vectors.S up_vectoraddrexcptn.S up_vectortab.S vfork.S
+CMN_CSRCS = up_assert.c up_blocktask.c up_copyfullstate.c up_createstack.c
+CMN_CSRCS += up_dataabort.c up_mdelay.c up_udelay.c up_exit.c up_idle.c
+CMN_CSRCS += up_initialize.c up_initialstate.c up_interruptcontext.c
+CMN_CSRCS += up_prefetchabort.c up_releasepending.c up_releasestack.c
+CMN_CSRCS += up_reprioritizertr.c up_schedulesigaction.c
+CMN_CSRCS += up_sigdeliver.c up_stackframe.c up_syscall.c up_unblocktask.c
+CMN_CSRCS += up_undefinedinsn.c up_usestack.c up_vfork.c
ifeq ($(CONFIG_ELF),y)
CMN_CSRCS += up_elf.c
@@ -53,9 +53,9 @@ ifeq ($(CONFIG_DEBUG_STACK),y)
CMN_CSRCS += up_checkstack.c
endif
-CHIP_ASRCS = imx_lowputc.S
-CHIP_CSRCS = imx_boot.c imx_gpio.c imx_allocateheap.c imx_irq.c \
- imx_serial.c imx_decodeirq.c imx_spi.c
+CHIP_ASRCS = imx_lowputc.S
+CHIP_CSRCS = imx_boot.c imx_gpio.c imx_allocateheap.c imx_irq.c
+CHIP_CSRCS += imx_serial.c imx_decodeirq.c imx_spi.c
ifneq ($(CONFIG_SCHED_TICKLESS),y)
CHIP_CSRCS += imx_timerisr.c
diff --git a/arch/arm/src/kinetis/Make.defs b/arch/arm/src/kinetis/Make.defs
index 4e5689d271..18896f1d72 100644
--- a/arch/arm/src/kinetis/Make.defs
+++ b/arch/arm/src/kinetis/Make.defs
@@ -47,8 +47,8 @@ CMN_CSRCS += up_mdelay.c up_udelay.c up_exit.c up_initialize.c up_memfault.c
CMN_CSRCS += up_initialstate.c up_interruptcontext.c up_modifyreg8.c
CMN_CSRCS += up_modifyreg16.c up_modifyreg32.c up_releasestack.c
CMN_CSRCS += up_reprioritizertr.c up_schedulesigaction.c up_releasepending.c
-CMN_CSRCS += up_sigdeliver.c up_unblocktask.c up_usestack.c up_doirq.c
-CMN_CSRCS += up_hardfault.c up_svcall.c up_checkstack.c up_vfork.c
+CMN_CSRCS += up_sigdeliver.c up_stackframe.c up_unblocktask.c up_usestack.c
+CMN_CSRCS += up_doirq.c up_hardfault.c up_svcall.c up_checkstack.c up_vfork.c
ifeq ($(CONFIG_ARCH_RAMVECTORS),y)
CMN_CSRCS += up_ramvec_initialize.c up_ramvec_attach.c
@@ -59,7 +59,7 @@ CMN_ASRCS += up_memcpy.S
endif
ifeq ($(CONFIG_BUILD_PROTECTED),y)
-CMN_CSRCS += up_mpu.c up_task_start.c up_pthread_start.c up_stackframe.c
+CMN_CSRCS += up_mpu.c up_task_start.c up_pthread_start.c
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
CMN_CSRCS += up_signal_dispatch.c
CMN_UASRCS += up_signal_handler.S
diff --git a/arch/arm/src/kl/Make.defs b/arch/arm/src/kl/Make.defs
index 12162fde0b..e7a4bceaa6 100644
--- a/arch/arm/src/kl/Make.defs
+++ b/arch/arm/src/kl/Make.defs
@@ -43,12 +43,12 @@ CMN_CSRCS += up_createstack.c up_mdelay.c up_udelay.c up_exit.c
CMN_CSRCS += up_initialize.c up_initialstate.c up_interruptcontext.c
CMN_CSRCS += up_puts.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
CMN_CSRCS += up_releasepending.c up_releasestack.c up_reprioritizertr.c
-CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c up_systemreset.c
-CMN_CSRCS += up_unblocktask.c up_usestack.c up_doirq.c up_hardfault.c
-CMN_CSRCS += up_svcall.c up_vectors.c up_vfork.c
+CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c up_stackframe.c
+CMN_CSRCS += up_systemreset.c up_unblocktask.c up_usestack.c up_doirq.c
+CMN_CSRCS += up_hardfault.c up_svcall.c up_vectors.c up_vfork.c
ifeq ($(CONFIG_BUILD_PROTECTED),y)
-CMN_CSRCS += up_task_start.c up_pthread_start.c up_stackframe.c
+CMN_CSRCS += up_task_start.c up_pthread_start.c
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
CMN_CSRCS += up_signal_dispatch.c
CMN_UASRCS += up_signal_handler.S
diff --git a/arch/arm/src/lpc17xx/Make.defs b/arch/arm/src/lpc17xx/Make.defs
index 539e5de71e..9c3bf96bae 100644
--- a/arch/arm/src/lpc17xx/Make.defs
+++ b/arch/arm/src/lpc17xx/Make.defs
@@ -54,8 +54,8 @@ CMN_CSRCS += up_mdelay.c up_udelay.c up_exit.c up_initialize.c up_memfault.c
CMN_CSRCS += up_initialstate.c up_interruptcontext.c up_modifyreg8.c
CMN_CSRCS += up_modifyreg16.c up_modifyreg32.c up_releasepending.c
CMN_CSRCS += up_releasestack.c up_reprioritizertr.c up_schedulesigaction.c
-CMN_CSRCS += up_sigdeliver.c up_unblocktask.c up_usestack.c up_doirq.c
-CMN_CSRCS += up_hardfault.c up_svcall.c up_checkstack.c up_vfork.c
+CMN_CSRCS += up_sigdeliver.c up_stackframe.c up_unblocktask.c up_usestack.c
+CMN_CSRCS += up_doirq.c up_hardfault.c up_svcall.c up_checkstack.c up_vfork.c
ifeq ($(CONFIG_ARMV7M_CMNVECTOR),y)
CMN_ASRCS += up_exception.S
@@ -71,7 +71,7 @@ CMN_ASRCS += up_memcpy.S
endif
ifeq ($(CONFIG_BUILD_PROTECTED),y)
-CMN_CSRCS += up_mpu.c up_task_start.c up_pthread_start.c up_stackframe.c
+CMN_CSRCS += up_mpu.c up_task_start.c up_pthread_start.c
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
CMN_CSRCS += up_signal_dispatch.c
CMN_UASRCS += up_signal_handler.S
diff --git a/arch/arm/src/lpc214x/Make.defs b/arch/arm/src/lpc214x/Make.defs
index a8a1bf9428..aaef5aba3f 100644
--- a/arch/arm/src/lpc214x/Make.defs
+++ b/arch/arm/src/lpc214x/Make.defs
@@ -33,19 +33,21 @@
#
##############################################################################
-HEAD_ASRC = lpc214x_head.S
+HEAD_ASRC = lpc214x_head.S
-CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S up_vectors.S \
- vfork.S
-CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copyfullstate.c \
- up_createstack.c up_dataabort.c up_mdelay.c up_udelay.c \
- up_exit.c up_idle.c up_initialize.c up_initialstate.c \
- up_interruptcontext.c up_prefetchabort.c up_releasepending.c \
- up_releasestack.c up_reprioritizertr.c up_syscall.c up_unblocktask.c \
- up_undefinedinsn.c up_usestack.c up_lowputs.c up_vfork.c
+CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S up_vectors.S
+CMN_ASRCS += vfork.S
+
+CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copyfullstate.c
+CMN_CSRCS += up_createstack.c up_dataabort.c up_mdelay.c up_udelay.c
+CMN_CSRCS += up_exit.c up_idle.c up_initialize.c up_initialstate.c
+CMN_CSRCS += up_interruptcontext.c up_prefetchabort.c up_releasepending.c
+CMN_CSRCS += up_releasestack.c up_reprioritizertr.c up_stackframe.c
+CMN_CSRCS += up_syscall.c up_unblocktask.c up_undefinedinsn.c up_usestack.c
+CMN_CSRCS += up_lowputs.c up_vfork.c
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
-CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c
+CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c
endif
ifeq ($(CONFIG_ELF),y)
@@ -56,8 +58,8 @@ ifeq ($(CONFIG_DEBUG_STACK),y)
CMN_CSRCS += up_checkstack.c
endif
-CHIP_ASRCS = lpc214x_lowputc.S
-CHIP_CSRCS = lpc214x_decodeirq.c lpc214x_irq.c lpc214x_serial.c
+CHIP_ASRCS = lpc214x_lowputc.S
+CHIP_CSRCS = lpc214x_decodeirq.c lpc214x_irq.c lpc214x_serial.c
ifneq ($(CONFIG_SCHED_TICKLESS),y)
CHIP_CSRCS += lpc214x_timerisr.c
@@ -66,4 +68,3 @@ endif
ifeq ($(CONFIG_USBDEV),y)
CHIP_CSRCS += lpc214x_usbdev.c
endif
-
diff --git a/arch/arm/src/lpc2378/Make.defs b/arch/arm/src/lpc2378/Make.defs
index 09c5cba6e1..469fd8ffc0 100644
--- a/arch/arm/src/lpc2378/Make.defs
+++ b/arch/arm/src/lpc2378/Make.defs
@@ -40,14 +40,15 @@
HEAD_ASRC = lpc23xx_head.S
-CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S up_vectors.S \
- vfork.S
-CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copyfullstate.c \
- up_createstack.c up_dataabort.c up_mdelay.c up_udelay.c \
- up_exit.c up_idle.c up_initialize.c up_initialstate.c \
- up_interruptcontext.c up_prefetchabort.c up_releasepending.c \
- up_releasestack.c up_reprioritizertr.c up_syscall.c up_unblocktask.c \
- up_undefinedinsn.c up_usestack.c up_lowputs.c up_vfork.c
+CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S up_vectors.S
+CMN_ASRCS += vfork.S
+CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copyfullstate.c
+CMN_CSRCS += up_createstack.c up_dataabort.c up_mdelay.c up_udelay.c
+CMN_CSRCS += up_exit.c up_idle.c up_initialize.c up_initialstate.c
+CMN_CSRCS += up_interruptcontext.c up_prefetchabort.c up_releasepending.c
+CMN_CSRCS += up_releasestack.c up_reprioritizertr.c up_stackframe.c
+CMN_CSRCS += up_syscall.c up_unblocktask.c up_undefinedinsn.c
+CMN_CSRCS += up_usestack.c up_lowputs.c up_vfork.c
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c
@@ -61,9 +62,9 @@ ifeq ($(CONFIG_DEBUG_STACK),y)
CMN_CSRCS += up_checkstack.c
endif
-CHIP_ASRCS = lpc23xx_lowputc.S
-CHIP_CSRCS = lpc23xx_pllsetup.c lpc23xx_decodeirq.c lpc23xx_irq.c \
- lpc23xx_serial.c lpc23xx_io.c
+CHIP_ASRCS = lpc23xx_lowputc.S
+CHIP_CSRCS += lpc23xx_pllsetup.c lpc23xx_decodeirq.c lpc23xx_irq.c
+CHIP_CSRCS += lpc23xx_serial.c lpc23xx_io.c
ifneq ($(CONFIG_SCHED_TICKLESS),y)
CHIP_CSRCS += lpc23xx_timerisr.c
@@ -80,4 +81,3 @@ endif
ifeq ($(CONFIG_USBDEV),y)
#CHIP_CSRCS += lpc23xx_usbdev.c
endif
-
diff --git a/arch/arm/src/lpc31xx/Make.defs b/arch/arm/src/lpc31xx/Make.defs
index ee97e6cbb5..d9b8f116b1 100644
--- a/arch/arm/src/lpc31xx/Make.defs
+++ b/arch/arm/src/lpc31xx/Make.defs
@@ -44,7 +44,7 @@ CMN_CSRCS += up_initialize.c up_initialstate.c up_interruptcontext.c
CMN_CSRCS += up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
CMN_CSRCS += up_prefetchabort.c up_releasepending.c up_releasestack.c
CMN_CSRCS += up_reprioritizertr.c up_schedulesigaction.c
-CMN_CSRCS += up_sigdeliver.c up_syscall.c up_unblocktask.c
+CMN_CSRCS += up_sigdeliver.c up_stackframe.c up_syscall.c up_unblocktask.c
CMN_CSRCS += up_undefinedinsn.c up_usestack.c up_vfork.c
ifeq ($(CONFIG_PAGING),y)
diff --git a/arch/arm/src/lpc43xx/Make.defs b/arch/arm/src/lpc43xx/Make.defs
index 04793d7b1f..9d7c48d9c0 100644
--- a/arch/arm/src/lpc43xx/Make.defs
+++ b/arch/arm/src/lpc43xx/Make.defs
@@ -43,8 +43,9 @@ CMN_CSRCS += up_createstack.c up_mdelay.c up_udelay.c up_exit.c
CMN_CSRCS += up_initialize.c up_initialstate.c up_interruptcontext.c
CMN_CSRCS += up_memfault.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
CMN_CSRCS += up_releasepending.c up_releasestack.c up_reprioritizertr.c
-CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c up_unblocktask.c
-CMN_CSRCS += up_usestack.c up_doirq.c up_hardfault.c up_svcall.c up_vfork.c
+CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c up_stackframe.c
+CMN_CSRCS += up_unblocktask.c up_usestack.c up_doirq.c up_hardfault.c
+CMN_CSRCS += up_svcall.c up_vfork.c
ifeq ($(CONFIG_ARMV7M_CMNVECTOR),y)
CMN_ASRCS += up_exception.S
@@ -60,7 +61,7 @@ CMN_ASRCS += up_memcpy.S
endif
ifeq ($(CONFIG_BUILD_PROTECTED),y)
-CMN_CSRCS += up_mpu.c up_task_start.c up_pthread_start.c up_stackframe.c
+CMN_CSRCS += up_mpu.c up_task_start.c up_pthread_start.c
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
CMN_CSRCS += up_signal_dispatch.c
CMN_UASRCS += up_signal_handler.S
diff --git a/arch/arm/src/nuc1xx/Make.defs b/arch/arm/src/nuc1xx/Make.defs
index 6161b49288..f13458904a 100644
--- a/arch/arm/src/nuc1xx/Make.defs
+++ b/arch/arm/src/nuc1xx/Make.defs
@@ -43,12 +43,12 @@ CMN_CSRCS += up_createstack.c up_mdelay.c up_udelay.c up_exit.c
CMN_CSRCS += up_initialize.c up_initialstate.c up_interruptcontext.c
CMN_CSRCS += up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
CMN_CSRCS += up_releasepending.c up_releasestack.c up_reprioritizertr.c
-CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c up_systemreset.c
-CMN_CSRCS += up_unblocktask.c up_usestack.c up_doirq.c up_hardfault.c
-CMN_CSRCS += up_svcall.c up_vectors.c up_vfork.c
+CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c up_stackframe.c
+CMN_CSRCS += up_systemreset.c up_unblocktask.c up_usestack.c up_doirq.c
+CMN_CSRCS += up_hardfault.c up_svcall.c up_vectors.c up_vfork.c
ifeq ($(CONFIG_BUILD_PROTECTED),y)
-CMN_CSRCS += up_task_start.c up_pthread_start.c up_stackframe.c
+CMN_CSRCS += up_task_start.c up_pthread_start.c
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
CMN_CSRCS += up_signal_dispatch.c
CMN_UASRCS += up_signal_handler.S
diff --git a/arch/arm/src/sam34/Make.defs b/arch/arm/src/sam34/Make.defs
index ec7d10b3ae..cb1727565e 100644
--- a/arch/arm/src/sam34/Make.defs
+++ b/arch/arm/src/sam34/Make.defs
@@ -49,8 +49,8 @@ CMN_CSRCS += up_mdelay.c up_udelay.c up_exit.c up_idle.c up_initialize.c
CMN_CSRCS += up_initialstate.c up_interruptcontext.c up_memfault.c up_modifyreg8.c
CMN_CSRCS += up_modifyreg16.c up_modifyreg32.c up_releasepending.c
CMN_CSRCS += up_releasestack.c up_reprioritizertr.c up_schedulesigaction.c
-CMN_CSRCS += up_sigdeliver.c up_unblocktask.c up_usestack.c up_doirq.c
-CMN_CSRCS += up_hardfault.c up_svcall.c up_vfork.c
+CMN_CSRCS += up_sigdeliver.c up_stackframe.c up_unblocktask.c up_usestack.c
+CMN_CSRCS += up_doirq.c up_hardfault.c up_svcall.c up_vfork.c
# Configuration-dependent common files
@@ -63,7 +63,7 @@ CMN_ASRCS += up_memcpy.S
endif
ifeq ($(CONFIG_BUILD_PROTECTED),y)
-CMN_CSRCS += up_mpu.c up_task_start.c up_pthread_start.c up_stackframe.c
+CMN_CSRCS += up_mpu.c up_task_start.c up_pthread_start.c
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
CMN_CSRCS += up_signal_dispatch.c
CMN_UASRCS += up_signal_handler.S
diff --git a/arch/arm/src/sama5/Make.defs b/arch/arm/src/sama5/Make.defs
index 6daa81b5ea..dc4544df72 100644
--- a/arch/arm/src/sama5/Make.defs
+++ b/arch/arm/src/sama5/Make.defs
@@ -64,7 +64,7 @@ endif
CMN_CSRCS = up_initialize.c up_idle.c up_interruptcontext.c up_exit.c
CMN_CSRCS += up_createstack.c up_releasestack.c up_usestack.c up_vfork.c
-CMN_CSRCS += up_puts.c up_mdelay.c up_udelay.c
+CMN_CSRCS += up_puts.c up_mdelay.c up_stackframe.c up_udelay.c
CMN_CSRCS += up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
CMN_CSRCS += arm_assert.c arm_blocktask.c arm_copyfullstate.c arm_dataabort.c
@@ -85,7 +85,7 @@ CMN_CSRCS += arm_va2pte.c
endif
ifeq ($(CONFIG_BUILD_KERNEL),y)
-CMN_CSRCS += up_task_start.c up_pthread_start.c up_stackframe.c
+CMN_CSRCS += up_task_start.c up_pthread_start.c
endif
ifeq ($(CONFIG_ARCH_ADDRENV),y)
diff --git a/arch/arm/src/samd/Make.defs b/arch/arm/src/samd/Make.defs
index 1cc4b2f4df..3e7bc4ba01 100644
--- a/arch/arm/src/samd/Make.defs
+++ b/arch/arm/src/samd/Make.defs
@@ -43,12 +43,12 @@ CMN_CSRCS += up_createstack.c up_mdelay.c up_udelay.c up_exit.c
CMN_CSRCS += up_initialize.c up_initialstate.c up_interruptcontext.c
CMN_CSRCS += up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
CMN_CSRCS += up_releasepending.c up_releasestack.c up_reprioritizertr.c
-CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c up_systemreset.c
-CMN_CSRCS += up_unblocktask.c up_usestack.c up_doirq.c up_hardfault.c
-CMN_CSRCS += up_svcall.c up_vectors.c up_vfork.c
+CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c up_stackframe.c
+CMN_CSRCS += up_systemreset.c up_unblocktask.c up_usestack.c up_doirq.c
+CMN_CSRCS += up_hardfault.c up_svcall.c up_vectors.c up_vfork.c
ifeq ($(CONFIG_BUILD_PROTECTED),y)
-CMN_CSRCS += up_task_start.c up_pthread_start.c up_stackframe.c
+CMN_CSRCS += up_task_start.c up_pthread_start.c
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
CMN_CSRCS += up_signal_dispatch.c
CMN_UASRCS += up_signal_handler.S
diff --git a/arch/arm/src/stm32/Make.defs b/arch/arm/src/stm32/Make.defs
index 2a3675da19..2cbf01cc90 100644
--- a/arch/arm/src/stm32/Make.defs
+++ b/arch/arm/src/stm32/Make.defs
@@ -50,9 +50,9 @@ CMN_CSRCS += up_createstack.c up_mdelay.c up_udelay.c up_exit.c
CMN_CSRCS += up_initialize.c up_initialstate.c up_interruptcontext.c
CMN_CSRCS += up_memfault.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
CMN_CSRCS += up_releasepending.c up_releasestack.c up_reprioritizertr.c
-CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c up_systemreset.c
-CMN_CSRCS += up_unblocktask.c up_usestack.c up_doirq.c up_hardfault.c
-CMN_CSRCS += up_svcall.c up_vfork.c
+CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c up_stackframe.c
+CMN_CSRCS += up_systemreset.c up_unblocktask.c up_usestack.c up_doirq.c
+CMN_CSRCS += up_hardfault.c up_svcall.c up_vfork.c
ifeq ($(CONFIG_ARMV7M_CMNVECTOR),y)
CMN_ASRCS += up_exception.S
@@ -68,7 +68,7 @@ CMN_ASRCS += up_memcpy.S
endif
ifeq ($(CONFIG_BUILD_PROTECTED),y)
-CMN_CSRCS += up_mpu.c up_task_start.c up_pthread_start.c up_stackframe.c
+CMN_CSRCS += up_mpu.c up_task_start.c up_pthread_start.c
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
CMN_CSRCS += up_signal_dispatch.c
CMN_UASRCS += up_signal_handler.S
diff --git a/arch/arm/src/str71x/Make.defs b/arch/arm/src/str71x/Make.defs
index 57ec38a9f5..7ab03c675e 100644
--- a/arch/arm/src/str71x/Make.defs
+++ b/arch/arm/src/str71x/Make.defs
@@ -35,14 +35,16 @@
HEAD_ASRC = str71x_head.S
-CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S up_vectors.S \
- vfork.S
-CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copyfullstate.c \
- up_createstack.c up_dataabort.c up_mdelay.c up_udelay.c \
- up_exit.c up_idle.c up_initialize.c up_initialstate.c \
- up_interruptcontext.c up_prefetchabort.c up_releasepending.c \
- up_releasestack.c up_reprioritizertr.c up_syscall.c up_unblocktask.c \
- up_undefinedinsn.c up_usestack.c up_lowputs.c up_vfork.c
+CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S up_vectors.S
+CMN_ASRCS += vfork.S
+
+CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copyfullstate.c
+CMN_CSRCS += up_createstack.c up_dataabort.c up_mdelay.c up_udelay.c
+CMN_CSRCS += up_exit.c up_idle.c up_initialize.c up_initialstate.c
+CMN_CSRCS += up_interruptcontext.c up_prefetchabort.c up_releasepending.c
+CMN_CSRCS += up_releasestack.c up_reprioritizertr.c up_stackframe.c
+CMN_CSRCS += up_syscall.c up_unblocktask.c up_undefinedinsn.c up_usestack.c
+CMN_CSRCS += up_lowputs.c up_vfork.c
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c
@@ -56,19 +58,19 @@ ifeq ($(CONFIG_DEBUG_STACK),y)
CMN_CSRCS += up_checkstack.c
endif
-CHIP_ASRCS =
-CHIP_CSRCS = str71x_prccu.c str71x_lowputc.c str71x_decodeirq.c str71x_irq.c \
- str71x_serial.c
+CHIP_ASRCS =
+CHIP_CSRCS = str71x_prccu.c str71x_lowputc.c str71x_decodeirq.c str71x_irq.c
+CHIP_CSRCS += str71x_serial.c
ifneq ($(CONFIG_SCHED_TICKLESS),y)
CHIP_CSRCS += str71x_timerisr.c
endif
ifeq ($(CONFIG_USBDEV),y)
-CHIP_CSRCS += str71x_usbdev.c
+CHIP_CSRCS+= str71x_usbdev.c
endif
ifeq ($(CONFIG_STR71X_XTI),y)
-CHIP_CSRCS += str71x_xti.c
+CHIP_CSRCS+= str71x_xti.c
endif
diff --git a/arch/arm/src/tiva/Make.defs b/arch/arm/src/tiva/Make.defs
index e13771bfa2..0b2b5cd6e4 100644
--- a/arch/arm/src/tiva/Make.defs
+++ b/arch/arm/src/tiva/Make.defs
@@ -43,8 +43,9 @@ CMN_CSRCS += up_mdelay.c up_udelay.c up_exit.c up_idle.c up_initialize.c
CMN_CSRCS += up_initialstate.c up_interruptcontext.c up_memfault.c
CMN_CSRCS += up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
CMN_CSRCS += up_releasepending.c up_releasestack.c up_reprioritizertr.c
-CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c up_unblocktask.c
-CMN_CSRCS += up_usestack.c up_doirq.c up_hardfault.c up_svcall.c up_vfork.c
+CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c up_stackframe.c
+CMN_CSRCS += up_unblocktask.c up_usestack.c up_doirq.c up_hardfault.c
+CMN_CSRCS += up_svcall.c up_vfork.c
ifeq ($(CONFIG_ARCH_RAMVECTORS),y)
CMN_CSRCS += up_ramvec_initialize.c up_ramvec_attach.c
@@ -59,7 +60,7 @@ CMN_CSRCS += up_checkstack.c
endif
ifeq ($(CONFIG_BUILD_PROTECTED),y)
-CMN_CSRCS += up_mpu.c up_task_start.c up_pthread_start.c up_stackframe.c
+CMN_CSRCS += up_mpu.c up_task_start.c up_pthread_start.c
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
CMN_CSRCS += up_signal_dispatch.c
CMN_UASRCS += up_signal_handler.S
diff --git a/arch/avr/src/at32uc3/Make.defs b/arch/avr/src/at32uc3/Make.defs
index fa1f010cf8..0e1a98e2ae 100644
--- a/arch/avr/src/at32uc3/Make.defs
+++ b/arch/avr/src/at32uc3/Make.defs
@@ -39,14 +39,14 @@ HEAD_ASRC = up_nommuhead.S
# Common AVR/AVR32 files
-CMN_ASRCS = up_exceptions.S up_fullcontextrestore.S up_switchcontext.S
-CMN_CSRCS = up_assert.c up_allocateheap.c up_blocktask.c up_copystate.c \
- up_createstack.c up_mdelay.c up_udelay.c up_exit.c up_idle.c \
- up_initialize.c up_initialstate.c up_interruptcontext.c \
- up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c \
- up_releasepending.c up_releasestack.c up_reprioritizertr.c \
- up_schedulesigaction.c up_sigdeliver.c up_unblocktask.c \
- up_usestack.c up_doirq.c
+CMN_ASRCS = up_exceptions.S up_fullcontextrestore.S up_switchcontext.S
+CMN_CSRCS = up_assert.c up_allocateheap.c up_blocktask.c up_copystate.c
+CMN_CSRCS += up_createstack.c up_mdelay.c up_udelay.c up_exit.c up_idle.c
+CMN_CSRCS += up_initialize.c up_initialstate.c up_interruptcontext.c
+CMN_CSRCS += up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
+CMN_CSRCS += up_releasepending.c up_releasestack.c up_reprioritizertr.c
+CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c up_stackframe.c
+CMN_CSRCS += up_unblocktask.c up_usestack.c up_doirq.c
# Configuration-dependent common files
@@ -56,9 +56,9 @@ endif
# Required AT32UC3 files
-CHIP_ASRCS =
-CHIP_CSRCS = at32uc3_clkinit.c at32uc3_gpio.c at32uc3_irq.c \
- at32uc3_lowconsole.c at32uc3_lowinit.c at32uc3_serial.c
+CHIP_ASRCS =
+CHIP_CSRCS = at32uc3_clkinit.c at32uc3_gpio.c at32uc3_irq.c
+CHIP_CSRCS += at32uc3_lowconsole.c at32uc3_lowinit.c at32uc3_serial.c
# Configuration-dependent AT32UC3 files
diff --git a/arch/avr/src/at90usb/Make.defs b/arch/avr/src/at90usb/Make.defs
index fb79d877ca..249f345dcd 100644
--- a/arch/avr/src/at90usb/Make.defs
+++ b/arch/avr/src/at90usb/Make.defs
@@ -39,14 +39,14 @@ HEAD_ASRC = at90usb_head.S
# Common AVR files
-CMN_ASRCS = up_switchcontext.S
-CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c \
- up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c \
- up_initialstate.c up_interruptcontext.c up_irq.c up_lowputs.c \
- up_mdelay.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c \
- up_puts.c up_releasepending.c up_releasestack.c \
- up_reprioritizertr.c up_schedulesigaction.c up_sigdeliver.c \
- up_udelay.c up_unblocktask.c up_usestack.c
+CMN_ASRCS = up_switchcontext.S
+CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c
+CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c
+CMN_CSRCS += up_initialstate.c up_interruptcontext.c up_irq.c up_lowputs.c
+CMN_CSRCS += up_mdelay.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
+CMN_CSRCS += up_puts.c up_releasepending.c up_releasestack.c
+CMN_CSRCS += up_reprioritizertr.c up_schedulesigaction.c up_sigdeliver.c
+CMN_CSRCS += up_stackframe.c up_udelay.c up_unblocktask.c up_usestack.c
# Configuration-dependent common files
@@ -80,4 +80,3 @@ endif
ifeq ($(CONFIG_AVR_USBDEV),y)
CHIP_CSRCS += at90usb_usbdev.c
endif
-
diff --git a/arch/avr/src/atmega/Make.defs b/arch/avr/src/atmega/Make.defs
index 7ffd174e0a..73377bd1a8 100644
--- a/arch/avr/src/atmega/Make.defs
+++ b/arch/avr/src/atmega/Make.defs
@@ -39,14 +39,14 @@ HEAD_ASRC = atmega_head.S
# Common AVR files
-CMN_ASRCS = up_switchcontext.S
-CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c \
- up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c \
- up_initialstate.c up_interruptcontext.c up_irq.c up_lowputs.c \
- up_mdelay.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c \
- up_puts.c up_releasepending.c up_releasestack.c \
- up_reprioritizertr.c up_schedulesigaction.c up_sigdeliver.c \
- up_udelay.c up_unblocktask.c up_usestack.c
+CMN_ASRCS = up_switchcontext.S
+CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c
+CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c
+CMN_CSRCS += up_initialstate.c up_interruptcontext.c up_irq.c up_lowputs.c
+CMN_CSRCS += up_mdelay.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
+CMN_CSRCS += up_puts.c up_releasepending.c up_releasestack.c
+CMN_CSRCS += up_reprioritizertr.c up_schedulesigaction.c up_sigdeliver.c
+CMN_CSRCS += up_stackframe.c up_udelay.c up_unblocktask.c up_usestack.c
# Configuration-dependent common files
@@ -78,5 +78,5 @@ endif
# Configuration-dependent ATMEGA files
ifeq ($(CONFIG_AVR_GPIOIRQ),y)
-CHIP_CSRCS +=
+CHIP_CSRCS +=
endif
diff --git a/arch/avr/src/avr/up_stackframe.c b/arch/avr/src/avr/up_stackframe.c
index 2a09f0550a..1dfa238a28 100644
--- a/arch/avr/src/avr/up_stackframe.c
+++ b/arch/avr/src/avr/up_stackframe.c
@@ -123,3 +123,4 @@ FAR void *up_stack_frame(FAR struct tcb_s *tcb, size_t frame_size)
return (FAR void *)(topaddr + sizeof(uint8_t));
}
+
diff --git a/arch/avr/src/avr32/up_stackframe.c b/arch/avr/src/avr32/up_stackframe.c
index e53eee5ae2..576f832850 100644
--- a/arch/avr/src/avr32/up_stackframe.c
+++ b/arch/avr/src/avr32/up_stackframe.c
@@ -138,3 +138,4 @@ FAR void *up_stack_frame(FAR struct tcb_s *tcb, size_t frame_size)
return (FAR void *)(topaddr + sizeof(uint32_t));
}
+
diff --git a/arch/hc/src/common/up_stackframe.c b/arch/hc/src/common/up_stackframe.c
index 4ced22c4a7..72777893da 100644
--- a/arch/hc/src/common/up_stackframe.c
+++ b/arch/hc/src/common/up_stackframe.c
@@ -139,3 +139,4 @@ FAR void *up_stack_frame(FAR struct tcb_s *tcb, size_t frame_size)
return (FAR void *)(topaddr + sizeof(uint16_t));
}
+
diff --git a/arch/hc/src/m9s12/Make.defs b/arch/hc/src/m9s12/Make.defs
index 41be083df1..809a0696c3 100644
--- a/arch/hc/src/m9s12/Make.defs
+++ b/arch/hc/src/m9s12/Make.defs
@@ -35,21 +35,21 @@
HEAD_ASRC = m9s12_vectors.S
-CMN_ASRCS =
-CMN_CSRCS = up_allocateheap.c up_blocktask.c up_copystate.c up_createstack.c \
- up_doirq.c up_exit.c up_idle.c up_initialize.c up_interruptcontext.c \
- up_mdelay.c up_modifyreg16.c up_modifyreg32.c up_modifyreg8.c \
- up_puts.c up_releasepending.c up_releasestack.c up_reprioritizertr.c \
- up_udelay.c up_unblocktask.c up_usestack.c
+CMN_ASRCS =
+CMN_CSRCS = up_allocateheap.c up_blocktask.c up_copystate.c up_createstack.c
+CMN_CSRCS += up_doirq.c up_exit.c up_idle.c up_initialize.c up_interruptcontext.c
+CMN_CSRCS += up_mdelay.c up_modifyreg16.c up_modifyreg32.c up_modifyreg8.c
+CMN_CSRCS += up_puts.c up_releasepending.c up_releasestack.c up_reprioritizertr.c
+CMN_CSRCS += up_stackframe.c up_udelay.c up_unblocktask.c up_usestack.c
-CHIP_ASRCS = m9s12_start.S m9s12_lowputc.S m9s12_saveusercontext.S
-CHIP_CSRCS = m9s12_assert.c m9s12_gpio.c m9s12_gpioirq.c m9s12_initialstate.c \
- m9s12_irq.c m9s12_serial.c
+CHIP_ASRCS = m9s12_start.S m9s12_lowputc.S m9s12_saveusercontext.S
+CHIP_CSRCS = m9s12_assert.c m9s12_gpio.c m9s12_gpioirq.c m9s12_initialstate.c
+CHIP_CSRCS += m9s12_irq.c m9s12_serial.c
ifneq ($(CONFIG_SCHED_TICKLESS),y)
CHIP_CSRCS += m9s12_timerisr.c
endif
ifeq ($(CONFIG_DEBUG_GPIO),y)
-CHIP_CSRCS += m9s12_dumpgpio.c
+CHIP_CSRCS+= m9s12_dumpgpio.c
endif
diff --git a/arch/mips/src/common/up_stackframe.c b/arch/mips/src/common/up_stackframe.c
index 87f13bc428..1c4776af53 100644
--- a/arch/mips/src/common/up_stackframe.c
+++ b/arch/mips/src/common/up_stackframe.c
@@ -140,3 +140,4 @@ FAR void *up_stack_frame(FAR struct tcb_s *tcb, size_t frame_size)
return (FAR void *)(topaddr + sizeof(uint32_t));
}
+
diff --git a/arch/mips/src/pic32mx/Make.defs b/arch/mips/src/pic32mx/Make.defs
index 873fc15718..aac5b19f17 100644
--- a/arch/mips/src/pic32mx/Make.defs
+++ b/arch/mips/src/pic32mx/Make.defs
@@ -39,14 +39,15 @@ HEAD_ASRC = pic32mx-head.S
# Common MIPS files
-CMN_ASRCS = up_syscall0.S vfork.S
-CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c \
- up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c \
- up_initialstate.c up_interruptcontext.c up_irq.c up_lowputs.c \
- up_mdelay.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c \
- up_puts.c up_releasepending.c up_releasestack.c up_reprioritizertr.c \
- up_schedulesigaction.c up_sigdeliver.c up_swint0.c up_udelay.c \
- up_unblocktask.c up_usestack.c up_vfork.c
+CMN_ASRCS = up_syscall0.S vfork.S
+CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c
+CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c
+CMN_CSRCS += up_initialstate.c up_interruptcontext.c up_irq.c up_lowputs.c
+CMN_CSRCS += up_mdelay.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
+CMN_CSRCS += up_puts.c up_releasepending.c up_releasestack.c
+CMN_CSRCS += up_reprioritizertr.c up_schedulesigaction.c up_sigdeliver.c
+CMN_CSRCS += up_stackframe.c up_swint0.c up_udelay.c up_unblocktask.c
+CMN_CSRCS += up_usestack.c up_vfork.c
# Configuration dependent common files
@@ -62,9 +63,10 @@ endif
# Required PIC32MX files
-CHIP_ASRCS =
-CHIP_CSRCS = pic32mx-irq.c pic32mx-decodeirq.c pic32mx-exception.c pic32mx-gpio.c \
- pic32mx-lowconsole.c pic32mx-lowinit.c pic32mx-serial.c pic32mx-spi.c
+CHIP_ASRCS =
+CHIP_CSRCS = pic32mx-irq.c pic32mx-decodeirq.c pic32mx-exception.c
+CHIP_CSRCS += pic32mx-gpio.c pic32mx-lowconsole.c pic32mx-lowinit.c
+CHIP_CSRCS += pic32mx-serial.c pic32mx-spi.cO
# Configuration-dependent PIC32MX files
@@ -83,4 +85,3 @@ endif
ifeq ($(CONFIG_PIC32MX_ETHERNET),y)
CHIP_CSRCS += pic32mx-ethernet.c
endif
-
diff --git a/arch/rgmp/src/nuttx.c b/arch/rgmp/src/nuttx.c
index 3f9323bb7f..dc5478bd2f 100644
--- a/arch/rgmp/src/nuttx.c
+++ b/arch/rgmp/src/nuttx.c
@@ -170,7 +170,6 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
return OK;
}
-#ifdef CONFIG_BUILD_KERNEL
FAR void *up_stack_frame(FAR struct tcb_s *tcb, size_t frame_size)
{
uintptr_t topaddr;
@@ -199,7 +198,6 @@ FAR void *up_stack_frame(FAR struct tcb_s *tcb, size_t frame_size)
return (FAR void *)(topaddr + sizeof(uint32_t));
}
-#endif
void up_release_stack(struct tcb_s *dtcb, uint8_t ttype)
{
diff --git a/arch/sh/src/common/up_stackframe.c b/arch/sh/src/common/up_stackframe.c
index 736402b81a..727cbb7830 100644
--- a/arch/sh/src/common/up_stackframe.c
+++ b/arch/sh/src/common/up_stackframe.c
@@ -136,3 +136,4 @@ FAR void *up_stack_frame(FAR struct tcb_s *tcb, size_t frame_size)
return (FAR void *)(topaddr + sizeof(uint32_t));
}
+
diff --git a/arch/sh/src/m16c/Make.defs b/arch/sh/src/m16c/Make.defs
index ae5d34be6e..6995d37b1e 100644
--- a/arch/sh/src/m16c/Make.defs
+++ b/arch/sh/src/m16c/Make.defs
@@ -35,16 +35,16 @@
HEAD_ASRC = m16c_head.S
-CMN_ASRCS =
-CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c \
- up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c \
- up_interruptcontext.c up_lowputs.c up_mdelay.c up_puts.c \
- up_releasepending.c up_releasestack.c up_reprioritizertr.c \
- up_udelay.c up_unblocktask.c up_usestack.c
+CMN_ASRCS =
+CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c
+CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c
+CMN_CSRCS += up_interruptcontext.c up_lowputs.c up_mdelay.c up_puts.c
+CMN_CSRCS += up_releasepending.c up_releasestack.c up_reprioritizertr.c
+CMN_CSRCS += up_stackframe.c up_udelay.c up_unblocktask.c up_usestack.c
-CHIP_ASRCS = m16c_vectors.S
-CHIP_CSRCS = m16c_initialstate.c m16c_copystate.c m16c_lowputc.c m16c_irq.c \
- m16c_serial.c m16c_dumpstate.c
+CHIP_ASRCS = m16c_vectors.S
+CHIP_CSRCS = m16c_initialstate.c m16c_copystate.c m16c_lowputc.c m16c_irq.c
+CHIP_CSRCS += m16c_serial.c m16c_dumpstate.c
ifneq ($(CONFIG_SCHED_TICKLESS),y)
CHIP_CSRCS += m16c_timerisr.c
@@ -53,5 +53,3 @@ endif
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
CHIP_CSRCS += m16c_schedulesigaction.c m16c_sigdeliver.c
endif
-
-
diff --git a/arch/sh/src/sh1/Make.defs b/arch/sh/src/sh1/Make.defs
index 28a3150d53..180034a72d 100644
--- a/arch/sh/src/sh1/Make.defs
+++ b/arch/sh/src/sh1/Make.defs
@@ -40,7 +40,8 @@ CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c
CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c
CMN_CSRCS += up_initialstate.c up_interruptcontext.c up_lowputs.c
CMN_CSRCS += up_mdelay.c up_puts.c up_releasepending.c up_releasestack.c
-CMN_CSRCS += up_reprioritizertr.c up_udelay.c up_unblocktask.c up_usestack.c
+CMN_CSRCS += up_reprioritizertr.c up_stackframe.c up_udelay.c
+CMN_CSRCS += up_unblocktask.c up_usestack.c
CHIP_ASRCS = sh1_vector.S sh1_saveusercontext.S
CHIP_CSRCS = sh1_lowputc.c sh1_irq.c sh1_serial.c sh1_initialstate.c
diff --git a/arch/sim/src/up_stackframe.c b/arch/sim/src/up_stackframe.c
index 542403c9ac..ef64985983 100644
--- a/arch/sim/src/up_stackframe.c
+++ b/arch/sim/src/up_stackframe.c
@@ -138,3 +138,4 @@ FAR void *up_stack_frame(FAR struct tcb_s *tcb, size_t frame_size)
return (FAR void *)(topaddr + sizeof(uint32_t));
}
+
diff --git a/arch/x86/src/i486/up_stackframe.c b/arch/x86/src/i486/up_stackframe.c
index fd93ac48fb..4f2ee156ab 100644
--- a/arch/x86/src/i486/up_stackframe.c
+++ b/arch/x86/src/i486/up_stackframe.c
@@ -139,3 +139,4 @@ FAR void *up_stack_frame(FAR struct tcb_s *tcb, size_t frame_size)
return (FAR void *)(topaddr + sizeof(uint32_t));
}
+
diff --git a/arch/x86/src/qemu/Make.defs b/arch/x86/src/qemu/Make.defs
index 86fe009aee..9d2d78f3bc 100644
--- a/arch/x86/src/qemu/Make.defs
+++ b/arch/x86/src/qemu/Make.defs
@@ -46,7 +46,8 @@ CMN_CSRCS += up_initialize.c up_initialstate.c up_interruptcontext.c
CMN_CSRCS += up_irq.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
CMN_CSRCS += up_regdump.c up_releasepending.c up_releasestack.c
CMN_CSRCS += up_reprioritizertr.c up_savestate.c up_sigdeliver.c
-CMN_CSRCS += up_schedulesigaction.c up_unblocktask.c up_usestack.c
+CMN_CSRCS += up_schedulesigaction.c up_stackframe.c up_unblocktask.c
+CMN_CSRCS += up_usestack.c
# Required QEMU files
diff --git a/arch/z16/src/common/up_stackframe.c b/arch/z16/src/common/up_stackframe.c
index feb5c85782..8823034c45 100644
--- a/arch/z16/src/common/up_stackframe.c
+++ b/arch/z16/src/common/up_stackframe.c
@@ -137,3 +137,4 @@ FAR void *up_stack_frame(FAR struct tcb_s *tcb, size_t frame_size)
return (FAR void *)(topaddr + sizeof(uint32_t));
}
+
diff --git a/arch/z16/src/z16f/Make.defs b/arch/z16/src/z16f/Make.defs
index 8db9e88942..f14570fb6a 100644
--- a/arch/z16/src/z16f/Make.defs
+++ b/arch/z16/src/z16f/Make.defs
@@ -41,7 +41,8 @@ CMN_CSRCS += up_assert.c up_initialstate.c up_sigdeliver.c up_blocktask.c
CMN_CSRCS += up_interruptcontext.c up_stackdump.c up_copystate.c
CMN_CSRCS += up_mdelay.c up_udelay.c up_createstack.c up_registerdump.c
CMN_CSRCS += up_unblocktask.c up_doirq.c up_releasepending.c up_usestack.c
-CMN_CSRCS += up_exit.c up_releasestack.c up_idle.c up_reprioritizertr.c
+CMN_CSRCS += up_exit.c up_releasestack.c up_stackframe.c up_idle.c
+CMN_CSRCS += up_reprioritizertr.c
CHIP_SSRCS = z16f_lowuart.S z16f_saveusercontext.S z16f_restoreusercontext.S
CHIP_CSRCS = z16f_clkinit.c z16f_sysexec.c z16f_irq.c z16f_serial.c
diff --git a/arch/z80/src/common/up_stackframe.c b/arch/z80/src/common/up_stackframe.c
index 1db0bf470c..2c419c723e 100644
--- a/arch/z80/src/common/up_stackframe.c
+++ b/arch/z80/src/common/up_stackframe.c
@@ -136,3 +136,4 @@ FAR void *up_stack_frame(FAR struct tcb_s *tcb, size_t frame_size)
return (FAR void *)(topaddr + sizeof(uint32_t));
}
+
diff --git a/arch/z80/src/ez80/Make.defs b/arch/z80/src/ez80/Make.defs
index 3ce0b4c42d..4dbeed0f3a 100644
--- a/arch/z80/src/ez80/Make.defs
+++ b/arch/z80/src/ez80/Make.defs
@@ -36,15 +36,16 @@
HEAD_ASRC = ez80_vectors.asm
HEAD_SSRC =
-CMN_SSRCS =
-CMN_CSRCS = up_initialize.c up_allocateheap.c up_createstack.c \
- up_releasestack.c up_interruptcontext.c up_blocktask.c \
- up_unblocktask.c up_exit.c up_releasepending.c \
- up_reprioritizertr.c up_idle.c up_assert.c up_doirq.c \
- up_mdelay.c up_udelay.c up_usestack.c up_puts.c
+CMN_SSRCS =
+CMN_CSRCS = up_initialize.c up_allocateheap.c up_createstack.c
+CMN_CSRCS += up_releasestack.c up_interruptcontext.c up_blocktask.c
+CMN_CSRCS += up_unblocktask.c up_exit.c up_releasepending.c
+CMN_CSRCS += up_reprioritizertr.c up_idle.c up_assert.c up_doirq.c
+CMN_CSRCS += up_mdelay.c up_stackframe.c up_udelay.c up_usestack.c
+CMN_CSRCS += up_puts.c
-CHIP_ASRCS = ez80_startup.asm ez80_io.asm ez80_irqsave.asm \
- ez80_saveusercontext.asm ez80_restorecontext.asm
+CHIP_ASRCS = ez80_startup.asm ez80_io.asm ez80_irqsave.asm
+ ez80_saveusercontext.asm ez80_restorecontext.asm
ifeq ($(CONFIG_ARCH_CHIP_EZ80F91),y)
CHIP_ASRCS += ez80f91_init.asm
endif
diff --git a/arch/z80/src/z180/Make.defs b/arch/z80/src/z180/Make.defs
index 3e8c4b7f40..0f71bb9494 100644
--- a/arch/z80/src/z180/Make.defs
+++ b/arch/z80/src/z180/Make.defs
@@ -45,8 +45,8 @@ CMN_ASRCS =
CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_createstack.c
CMN_CSRCS += up_doirq.c up_exit.c up_idle.c up_initialize.c
CMN_CSRCS += up_interruptcontext.c up_mdelay.c up_releasepending.c
-CMN_CSRCS += up_releasestack.c up_reprioritizertr.c up_unblocktask.c
-CMN_CSRCS += up_udelay.c up_usestack.c
+CMN_CSRCS += up_releasestack.c up_stackframe.c up_reprioritizertr.c
+CMN_CSRCS += up_unblocktask.c up_udelay.c up_usestack.c
CHIP_ASRCS = z180_restoreusercontext.asm z180_saveusercontext.asm
CHIP_ASRCS += z180_vectcommon.asm
diff --git a/arch/z80/src/z8/Make.defs b/arch/z80/src/z8/Make.defs
index 50f1d98b04..7a7476aa4f 100644
--- a/arch/z80/src/z8/Make.defs
+++ b/arch/z80/src/z8/Make.defs
@@ -35,12 +35,12 @@
HEAD_SSRC = z8_head.S
-CMN_SSRCS =
-CMN_CSRCS = up_initialize.c up_allocateheap.c up_createstack.c \
- up_releasestack.c up_interruptcontext.c up_blocktask.c \
- up_unblocktask.c up_exit.c up_releasepending.c \
- up_reprioritizertr.c up_idle.c up_assert.c up_doirq.c \
- up_mdelay.c up_udelay.c up_usestack.c
+CMN_SSRCS =
+CMN_CSRCS = up_initialize.c up_allocateheap.c up_createstack.c
+CMN_CSRCS += up_releasestack.c up_interruptcontext.c up_blocktask.c
+CMN_CSRCS += up_unblocktask.c up_exit.c up_releasepending.c
+CMN_CSRCS += up_reprioritizertr.c up_idle.c up_assert.c up_doirq.c
+CMN_CSRCS += up_mdelay.c up_stackframe.c up_udelay.c up_usestack.c
CHIP_SSRCS = z8_vector.S z8_saveusercontext.S z8_restorecontext.S
CHIP_CSRCS = z8_initialstate.c z8_irq.c z8_saveirqcontext.c
diff --git a/arch/z80/src/z80/Make.defs b/arch/z80/src/z80/Make.defs
index c60e88be64..485dc3bbcd 100644
--- a/arch/z80/src/z80/Make.defs
+++ b/arch/z80/src/z80/Make.defs
@@ -35,21 +35,22 @@
ifeq ($(CONFIG_ARCH_HAVEHEAD),)
ifeq ($(CONFIG_LINKER_ROM_AT_0000),y)
-HEAD_ASRC = z80_rom.asm
+HEAD_ASRC = z80_rom.asm
else
-HEAD_ASRC = z80_head.asm
+HEAD_ASRC = z80_head.asm
endif
endif
-CMN_ASRCS =
-CMN_CSRCS = up_initialize.c up_allocateheap.c up_createstack.c \
- up_releasestack.c up_interruptcontext.c up_blocktask.c \
- up_unblocktask.c up_exit.c up_releasepending.c \
- up_reprioritizertr.c up_idle.c up_assert.c up_doirq.c \
- up_mdelay.c up_udelay.c up_usestack.c
+CMN_ASRCS =
-CHIP_ASRCS = z80_saveusercontext.asm z80_restoreusercontext.asm
-CHIP_CSRCS = z80_initialstate.c z80_io.c z80_irq.c z80_copystate.c \
- z80_schedulesigaction.c z80_sigdeliver.c \
- z80_registerdump.c
+CMN_CSRCS = up_initialize.c up_allocateheap.c up_createstack.c
+CMN_CSRCS += up_releasestack.c up_interruptcontext.c up_blocktask.c
+CMN_CSRCS += up_unblocktask.c up_exit.c up_releasepending.c
+CMN_CSRCS += up_reprioritizertr.c up_idle.c up_assert.c up_doirq.c
+CMN_CSRCS += up_mdelay.c up_stackframe.c up_udelay.c up_usestack.c
+CHIP_ASRCS = z80_saveusercontext.asm z80_restoreusercontext.asm
+
+CHIP_CSRCS = z80_initialstate.c z80_io.c z80_irq.c z80_copystate.c
+CHIP_CSRCS += z80_schedulesigaction.c z80_sigdeliver.c
+CHIP_CSRCS += z80_registerdump.c
diff --git a/include/nuttx/arch.h b/include/nuttx/arch.h
index 724f592070..f60ec6d8dc 100644
--- a/include/nuttx/arch.h
+++ b/include/nuttx/arch.h
@@ -277,7 +277,7 @@ int up_use_stack(FAR struct tcb_s *tcb, FAR void *stack, size_t stack_size);
*
* Description:
* Allocate a stack frame in the TCB's stack to hold thread-specific data.
- * This function may be called anytime after up_create_stack() or
+ * This function may be called any time after up_create_stack() or
* up_use_stack() have been called but before the task has been started.
*
* Thread data may be kept in the stack (instead of in the TCB) if it is
@@ -304,9 +304,7 @@ int up_use_stack(FAR struct tcb_s *tcb, FAR void *stack, size_t stack_size);
*
****************************************************************************/
-#if defined(CONFIG_BUILD_PROTECTED) || defined(CONFIG_BUILD_KERNEL)
FAR void *up_stack_frame(FAR struct tcb_s *tcb, size_t frame_size);
-#endif
/****************************************************************************
* Name: up_release_stack
diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h
index 40442cc879..4b5d6b5a5d 100644
--- a/include/nuttx/sched.h
+++ b/include/nuttx/sched.h
@@ -557,17 +557,7 @@ struct task_tcb_s
/* Values needed to restart a task ********************************************/
uint8_t init_priority; /* Initial priority of the task */
-
-#if defined(CONFIG_BUILD_PROTECTED) || defined(CONFIG_BUILD_KERNEL)
- /* In the kernel mode build, the arguments are saved on the task's stack */
-
FAR char **argv; /* Name+start-up parameters */
-#else
- /* Otherwise, the arguments are strdup'ed and the argv[] is statically */
- /* defined here: */
-
- char *argv[CONFIG_MAX_TASK_ARGS+1]; /* Name+start-up parameters */
-#endif
};
/* struct pthread_tcb_s **********************************************************/
diff --git a/sched/sched/sched_releasetcb.c b/sched/sched/sched_releasetcb.c
index 724e9e4095..f731a24421 100644
--- a/sched/sched/sched_releasetcb.c
+++ b/sched/sched/sched_releasetcb.c
@@ -111,9 +111,6 @@ static void sched_releasepid(pid_t pid)
int sched_releasetcb(FAR struct tcb_s *tcb, uint8_t ttype)
{
int ret = OK;
-#if !defined(CONFIG_BUILD_PROTECTED) && !defined(CONFIG_BUILD_KERNEL)
- int i;
-#endif
if (tcb)
{
@@ -150,7 +147,7 @@ int sched_releasetcb(FAR struct tcb_s *tcb, uint8_t ttype)
up_release_stack(tcb, ttype);
}
- /* Delete the tasks's allocated DSpace region (external modules only) */
+ /* Delete the task's allocated DSpace region (external modules only) */
#ifdef CONFIG_PIC
if (tcb->dspace)
@@ -166,28 +163,6 @@ int sched_releasetcb(FAR struct tcb_s *tcb, uint8_t ttype)
}
#endif
-#if !defined(CONFIG_BUILD_PROTECTED) && !defined(CONFIG_BUILD_KERNEL)
- /* Release command line arguments that were allocated for task
- * start/re-start.
- *
- * NOTE: In the kernel mode build, the arguments were saved on
- * the task's stack and will be cleaned up when the stack memory
- * is released. Nothing need be done here in that case.
- */
-
-#ifndef CONFIG_DISABLE_PTHREAD
- if (ttype != TCB_FLAG_TTYPE_PTHREAD)
-#endif
- {
- FAR struct task_tcb_s *ttcb = (FAR struct task_tcb_s *)tcb;
- for (i = 1; i < CONFIG_MAX_TASK_ARGS+1 && ttcb->argv[i]; i++)
- {
- sched_kfree((FAR void*)ttcb->argv[i]);
- }
- }
-
-#endif /* !CONFIG_BUILD_PROTECTED && !CONFIG_BUILD_KERNEL */
-
/* Release this thread's reference to the address environment */
#ifdef CONFIG_ARCH_ADDRENV
diff --git a/sched/task/task_setup.c b/sched/task/task_setup.c
index 9ef1b0d39f..bed71707bf 100644
--- a/sched/task/task_setup.c
+++ b/sched/task/task_setup.c
@@ -1,7 +1,7 @@
/****************************************************************************
* sched/task/task_setup.c
*
- * Copyright (C) 2007-2013 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -426,98 +426,31 @@ static void task_namesetup(FAR struct task_tcb_s *tcb, FAR const char *name)
# define task_namesetup(t,n)
#endif /* CONFIG_TASK_NAME_SIZE */
-/****************************************************************************
- * Name: task_tcbargsetup
- *
- * Description:
- * This functions is called only from task_argsetup() in the "normal"
- * case, where the argv[] array is a structure in the TCB. This function
- * will clone all of the arguments using strdup.
- *
- * Input Parameters:
- * tcb - Address of the new task's TCB
- * argv - A pointer to an array of input parameters.
- * Up to CONFIG_MAX_TASK_ARG parameters may be
- * provided. If fewer than CONFIG_MAX_TASK_ARG
- * parameters are passed, the list should be
- * terminated with a NULL argv[] value.
- * If no parameters are required, argv may be NULL.
- *
- * Return Value:
- * OK. This function always succeeds.
- *
- ****************************************************************************/
-
-#if !defined(CONFIG_BUILD_PROTECTED) && !defined(CONFIG_BUILD_KERNEL)
-static int task_tcbargsetup(FAR struct task_tcb_s *tcb,
- FAR char * const argv[])
-{
- int i;
-
- /* Save the name as the first argument */
-
-#if CONFIG_TASK_NAME_SIZE > 0
- tcb->argv[0] = tcb->cmn.name;
-#else
- tcb->argv[0] = (FAR char *)g_noname;
-#endif /* CONFIG_TASK_NAME_SIZE */
-
- /* For tasks, the life of the argument must be as long as the life of the
- * task and the arguments must be strings. So for tasks, we have to dup
- * the strings.
- *
- * The first NULL argument terminates the list of arguments. The argv
- * pointer may be NULL if no parameters are passed.
- */
-
- i = 1;
- if (argv)
- {
- for (; i < CONFIG_MAX_TASK_ARGS+1 && argv[i-1]; i++)
- {
- tcb->argv[i] = strdup(argv[i-1]);
- }
- }
-
- /* Nullify any unused argument storage */
-
- for (; i < CONFIG_MAX_TASK_ARGS+1; i++)
- {
- tcb->argv[i] = NULL;
- }
-
- return OK;
-}
-#endif /* !CONFIG_BUILD_PROTECTED && !CONFIG_BUILD_KERNEL */
-
/****************************************************************************
* Name: task_stackargsetup
*
* Description:
- * This functions is called only from task_argsetup() for the case of the
- * kernel build where the argv[] array and all strings are copied to the
- * task's stack. This is done because the TCB (and kernel allocated
- * strings) are only accessible in kernel-mode. Data on the stack, on the
- * other hand, is guaranteed to be accessible no matter what mode the
- * task runs in.
+ * This functions is called only from task_argsetup() It will allocate
+ * space on the new task's stack and will copy the argv[] array and all
+ * strings to the task's stack where it is readily accessible to the
+ * task. Data on the stack, on the other hand, is guaranteed to be
+ * accessible no matter what privilege mode the task runs in.
*
* Input Parameters:
- * tcb - Address of the new task's TCB
- * argv - A pointer to an array of input parameters.
- * Up to CONFIG_MAX_TASK_ARG parameters may be
- * provided. If fewer than CONFIG_MAX_TASK_ARG
- * parameters are passed, the list should be
- * terminated with a NULL argv[] value.
- * If no parameters are required, argv may be NULL.
+ * tcb - Address of the new task's TCB
+ * argv - A pointer to an array of input parameters. Up to
+ * CONFIG_MAX_TASK_ARG parameters may be provided. If fewer than
+ * CONFIG_MAX_TASK_ARG parameters are passed, the list should be
+ * terminated with a NULL argv[] value. If no parameters are
+ * required, argv may be NULL.
*
* Return Value:
- * zero on success; a negated errno on failure.
+ * Zero (OK) on success; a negated errno on failure.
*
****************************************************************************/
-#if defined(CONFIG_BUILD_PROTECTED) || defined(CONFIG_BUILD_KERNEL)
-static int task_stackargsetup(FAR struct task_tcb_s *tcb,
- FAR char * const argv[])
+static inline int task_stackargsetup(FAR struct task_tcb_s *tcb,
+ FAR char * const argv[])
{
FAR char **stackargv;
FAR const char *name;
@@ -568,8 +501,8 @@ static int task_stackargsetup(FAR struct task_tcb_s *tcb,
* task name plus a NULL argv[] entry to terminate the list.
*/
- argvlen = (argc + 2)*sizeof(FAR char*);
- stackargv = (FAR char **)up_stack_frame(&tcb->cmn, argvlen + strtablen);
+ argvlen = (argc + 2)*sizeof(FAR char*);
+ stackargv = (FAR char **)up_stack_frame(&tcb->cmn, argvlen + strtablen);
DEBUGASSERT(stackargv != NULL);
if (stackargv == NULL)
@@ -581,7 +514,7 @@ static int task_stackargsetup(FAR struct task_tcb_s *tcb,
* the argv[] array and mark it as a null string.
*/
- str = (FAR char *)stackargv + argvlen;
+ str = (FAR char *)stackargv + argvlen;
/* Copy the task name. Increment str to skip over the task name and its
* NUL terminator in the string buffer.
@@ -617,7 +550,6 @@ static int task_stackargsetup(FAR struct task_tcb_s *tcb,
return OK;
}
-#endif /* CONFIG_BUILD_PROTECTED || CONFIG_BUILD_KERNEL */
/****************************************************************************
* Public Functions
@@ -736,30 +668,14 @@ int pthread_schedsetup(FAR struct pthread_tcb_s *tcb, int priority, start_t star
int task_argsetup(FAR struct task_tcb_s *tcb, FAR const char *name,
FAR char * const argv[])
{
- int ret;
-
/* Setup the task name */
task_namesetup(tcb, name);
-#if defined(CONFIG_BUILD_PROTECTED) || defined(CONFIG_BUILD_KERNEL)
- /* In the kernel build case, the argv[] array and all strings are copied
- * to the task's stack. This is done because the TCB (and kernel allocated
- * strings) are only accessible in kernel-mode. Data on the stack, on the
- * other hand, is guaranteed to be accessible no matter what mode the
- * task runs in.
+ /* Copy the argv[] array and all strings are to the task's stack. Data on
+ * the stack is guaranteed to be accessible by the ask no matter what
+ * privilege mode the task runs in.
*/
- ret = task_stackargsetup(tcb, argv);
-
-#else
- /* In the "normal" case, the argv[] array is a structure in the TCB, the
- * arguments are cloned via strdup.
- */
-
- ret = task_tcbargsetup(tcb, argv);
-
-#endif /* CONFIG_BUILD_PROTECTED || CONFIG_BUILD_KERNEL */
-
- return ret;
+ return task_stackargsetup(tcb, argv);
}