From d288bdfe36901600acf8197470c26352655965e1 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 13 Sep 2014 14:31:41 -0600 Subject: [PATCH] Update porting guide to include stack address environment functions --- Documentation/NuttxPortingGuide.html | 125 ++++++++++++++++++++++++++- 1 file changed, 123 insertions(+), 2 deletions(-) diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html index eb5a67cc10..9ebccab1b2 100644 --- a/Documentation/NuttxPortingGuide.html +++ b/Documentation/NuttxPortingGuide.html @@ -12,7 +12,7 @@

NuttX RTOS Porting Guide

-

Last Updated: September 10, 2014

+

Last Updated: September 13, 2014

@@ -115,7 +115,11 @@ 4.4.7 up_addrenv_restore()
4.4.8 up_addrenv_clone()
4.4.9 up_addrenv_attach()
- 4.4.10 up_addrenv_detach() + 4.4.10 up_addrenv_detach()
+ 4.4.11 up_addrenv_stackalloc()
+ 4.4.12 up_addrenv_stackfree()
+ 4.4.13 up_addrenv_vstack()
+ 4.4.14 up_addrenv_stackselect() 4.5 APIs Exported by NuttX to Architecture-Specific Logic +
  • +

    + Dynamic Stack Support. + CONFIG_ARCH_STACK_DYNAMIC=y indicates that the user process stack resides in its own address space. + This options is also required if CONFIG_BUILD_KERNEL and CONFIG_LIBC_EXECFUNCS are selected. + Why? + Because the caller's stack must be preserved in its own address space when we instantiate the environment of the new process in order to initialize it. +

    +

    + NOTE: The naming of the CONFIG_ARCH_STACK_DYNAMIC selection implies that dynamic stack allocation is supported. + Certainly this option must be set if dynamic stack allocation is supported by a platform. + But the more general meaning of this configuration environment is simply that the stack has its own address space. +

    +

    + If CONFIG_ARCH_STACK_DYNAMIC=y is selected then the platform specific code must export these additional interfaces: +

    + +
  • 4.4.1 up_addrenv_create()

    @@ -3173,6 +3208,92 @@ VxWorks provides the following comparable interface: Zero (OK) on success; a negated errno value on failure. +

    4.4.11 up_addrenv_stackalloc()

    +

    Function Prototype:

    +

    +

    Description:

    + +

    Input Parameters:

    + +

    Returned Value:

    + + +

    4.4.12 up_addrenv_stackfree()

    +

    Function Prototype:

    +

    +

    Description:

    + +

    Input Parameters:

    + +

    Returned Value:

    + + +

    4.4.13 up_addrenv_vstack()

    +

    Function Prototype:

    +

    +

    Description:

    + +

    Input Parameters:

    + +

    Returned Value:

    + + +

    4.4.14 up_addrenv_stackselect()

    +

    Function Prototype:

    +

    +

    Description:

    + +

    Input Parameters:

    + +

    Returned Value:

    + +

    4.5 APIs Exported by NuttX to Architecture-Specific Logic

    These are standard interfaces that are exported by the OS