summaryrefslogtreecommitdiff
path: root/nuttx/include/nuttx/addrenv.h
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-09-13 13:17:44 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-09-13 13:17:44 -0600
commit41aad69165fed799bcd07d67c7b4dd062289a05a (patch)
treed57450daa18b568a0c6e440f2d9d0f35c5c1c83f /nuttx/include/nuttx/addrenv.h
parentcd877896bfbe641b36b91186cea6f3bc00102c64 (diff)
downloadnuttx-41aad69165fed799bcd07d67c7b4dd062289a05a.tar.gz
nuttx-41aad69165fed799bcd07d67c7b4dd062289a05a.tar.bz2
nuttx-41aad69165fed799bcd07d67c7b4dd062289a05a.zip
Move static helper routines from arm_addrenv.c and may them global so that they can be shared both forthcoming stack address environment logic.
Diffstat (limited to 'nuttx/include/nuttx/addrenv.h')
-rw-r--r--nuttx/include/nuttx/addrenv.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/nuttx/include/nuttx/addrenv.h b/nuttx/include/nuttx/addrenv.h
index 5f5ee5f1f..936b7ee14 100644
--- a/nuttx/include/nuttx/addrenv.h
+++ b/nuttx/include/nuttx/addrenv.h
@@ -274,6 +274,27 @@ struct addrenv_reserve_s
* up_addrenv_detach - Release the thread's reference to an address
* environment when a task/thread exits.
*
+ * 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:
+ *
+ * up_addrenv_stackalloc - Create a stack address environment
+ * up_addrenv_stackfree - Destroy a stack address environment.
+ * up_addrenv_vstack - Returns the virtual base address of the stack
+ * up_addrenv_stackselect - Instantiate a stack address environment
+ *
****************************************************************************/
/* Prototyped in include/nuttx/arch.h as part of the OS/platform interface */