summaryrefslogtreecommitdiff
path: root/nuttx/arch/sim/src/up_releasestack.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/sim/src/up_releasestack.c')
-rw-r--r--nuttx/arch/sim/src/up_releasestack.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/nuttx/arch/sim/src/up_releasestack.c b/nuttx/arch/sim/src/up_releasestack.c
index 49a68eb8d..f8f47c44d 100644
--- a/nuttx/arch/sim/src/up_releasestack.c
+++ b/nuttx/arch/sim/src/up_releasestack.c
@@ -82,12 +82,6 @@
* however, there are certain error recovery contexts where the TCB may
* not be fully initialized when up_release_stack is called.
*
- * If CONFIG_NUTTX_KERNEL is defined, then this thread type may affect
- * how the stack is freed. For example, kernel thread stacks may have
- * been allocated from protected kernel memory. Stacks for user tasks
- * and threads must have come from memory that is accessible to user
- * code.
- *
* Returned Value:
* None
*
@@ -99,20 +93,7 @@ void up_release_stack(FAR struct tcb_s *dtcb, uint8_t ttype)
if (dtcb->stack_alloc_ptr)
{
-#if defined(CONFIG_NUTTX_KERNEL) && defined(CONFIG_MM_KERNEL_HEAP)
- /* Use the kernel allocator if this is a kernel thread */
-
- if (ttype == TCB_FLAG_TTYPE_KERNEL)
- {
- sched_kfree(dtcb->stack_alloc_ptr);
- }
- else
-#endif
- {
- /* Use the user-space allocator if this is a task or pthread */
-
- sched_ufree(dtcb->stack_alloc_ptr);
- }
+ sched_ufree(dtcb->stack_alloc_ptr);
}
/* Mark the stack freed */