RISC-V: Prepare for CONFIG_BUILD_KERNEL

- Thread context prior to system call needs to be preserved
- Allocate a kernel heap
This commit is contained in:
Ville Juven
2022-02-24 09:12:51 +02:00
committed by Xiang Xiao
parent 195705d11f
commit 75afe491ad
8 changed files with 44 additions and 28 deletions

View File

@@ -189,7 +189,7 @@ int exec_module(FAR const struct binary_s *binp,
goto errout_with_addrenv;
}
#if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_BUILD_KERNEL)
#if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_ARCH_KERNEL_STACK)
/* Allocate the kernel stack */
ret = up_addrenv_kstackalloc(&tcb->cmn);