diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-09-14 09:53:54 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-09-14 09:53:54 -0600 |
commit | def9063a49cb5c309b03ad0dcd858d71a31a0ad5 (patch) | |
tree | db1a6538db4823142b5e4ca2817f64e06f163a78 /nuttx/include/nuttx/addrenv.h | |
parent | 659cb309b3e0dde2ce2f69320569bcd3ebda93af (diff) | |
download | nuttx-def9063a49cb5c309b03ad0dcd858d71a31a0ad5.tar.gz nuttx-def9063a49cb5c309b03ad0dcd858d71a31a0ad5.tar.bz2 nuttx-def9063a49cb5c309b03ad0dcd858d71a31a0ad5.zip |
Add the initial implementation of the process kernel stack logic. Not yet integrated into the main OS logic nor tested.
Diffstat (limited to 'nuttx/include/nuttx/addrenv.h')
-rw-r--r-- | nuttx/include/nuttx/addrenv.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/nuttx/include/nuttx/addrenv.h b/nuttx/include/nuttx/addrenv.h index ac5dce56e..77c7463a6 100644 --- a/nuttx/include/nuttx/addrenv.h +++ b/nuttx/include/nuttx/addrenv.h @@ -303,6 +303,21 @@ struct addrenv_reserve_s * up_addrenv_vustack - Returns the virtual base address of the stack * up_addrenv_ustackselect - Instantiate a stack address environment * + * If CONFIG_ARCH_KERNEL_STACK is selected, then each user process will have + * two stacks: (1) a large (and possibly dynamic) user stack and (2) a + * smaller kernel stack. However, this option is *required* if both + * CONFIG_BUILD_KERNEL and CONFIG_LIBC_EXECFUNCS are selected. Why? Because + * when we instantiate and initialize the address environment of the new + * user process, we will temporarily lose the address environment of the old + * user process, including its stack contents. The kernel C logic will crash + * immediately with no valid stack in place. + * + * If CONFIG_ARCH_STACK_DYNAMIC=y is selected then the platform specific + * code must export these additional interfaces: + * + * up_addrenv_kstackalloc - Create a stack in the kernel address environment + * up_addrenv_kstackfree - Destroy the kernel stack. + * ****************************************************************************/ /* Prototyped in include/nuttx/arch.h as part of the OS/platform interface */ |