There used to be two ways to pass parameters to new tasks, depending upon the configuration: Either (1) argv[] as created as an array with each string strdup'ed. Or (1) argv[] array and strings were created on the stack before the new task was started. Now, there is only one way, way (1). Way (2) might be slightly more compact, but this is not worth carry the complexity of two different ways of doing the same thing.
This commit is contained in:
parent
f25ea29aaa
commit
64ab35b399
@ -3634,13 +3634,13 @@ Mem: 29232 5920 23312 23312
|
||||
problems because of SDCC compiler differences.
|
||||
Refer to the NuttX board <a href="http://sourceforge.net/p/nuttx/git/ci/master/tree/misc/Obsoleted/configs/pjrc-8051/README.txt">README</a> file for further information.
|
||||
</p>
|
||||
<p>
|
||||
<b>Obsoleted</b>.
|
||||
This architecture has been obsoleted.
|
||||
The code has been moved out of the source tree an can now be found in <a href="http://sourceforge.net/p/nuttx/git/ci/master/tree/misc/Obsoleted/">Obsoleted</a> 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.
|
||||
</p>
|
||||
</ul>
|
||||
<p>
|
||||
<b><i>Obsoleted</i></b>.
|
||||
This architecture has been <i>obsoleted</i>.
|
||||
The code has been moved out of the NuttX source tree but can still be found be found in <a href="http://sourceforge.net/p/nuttx/git/ci/master/tree/misc/Obsoleted/">Obsoleted</a> 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.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -1870,7 +1870,7 @@ The system can be re-made subsequently by just typing <code>make</code>.
|
||||
<p>
|
||||
<b>Description</b>.
|
||||
Allocate a stack frame in the TCB's stack to hold thread-specific data.
|
||||
This function may be called anytime after <code>up_create_stack()</code> or <code>up_use_stack()</code> have been called but before the task has been started.
|
||||
This function may be called any time after <code>up_create_stack()</code> or <code>up_use_stack()</code> have been called but before the task has been started.
|
||||
</p>
|
||||
<p>
|
||||
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 <code>make</code>.
|
||||
This will still be the initial value of the stack pointer when the task is started.
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
This API is <i>NOT</i> required if <code>CONFIG_BUILD_PROTECTED</code> and <code>CONFIG_BUILD_KERNEL</code> are undefined.
|
||||
</p>
|
||||
<p><b>Input Parameters:</b></p>
|
||||
<ul>
|
||||
<li>
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 **********************************************************/
|
||||
|
@ -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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
*
|
||||
* 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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user