From e76058eccdb846a6a9f9da7cac4f22f6e41a7afc Mon Sep 17 00:00:00 2001 From: bernie Date: Sun, 24 Aug 2008 06:37:08 +0000 Subject: [PATCH] proc_exit(): Free the correct stack base pointer. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1678 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/kern/proc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bertos/kern/proc.c b/bertos/kern/proc.c index 0e3edbea..c3d89b43 100644 --- a/bertos/kern/proc.c +++ b/bertos/kern/proc.c @@ -286,10 +286,8 @@ void proc_exit(void) #endif #if (ARCH & ARCH_EMUL) -#warning This is wrong /* Reinsert process stack in free list */ - PROC_ATOMIC(ADDHEAD(&StackFreeList, (Node *)(CurrentProcess->stack - - (CONFIG_PROC_DEFSTACKSIZE / sizeof(cpustack_t))))); + PROC_ATOMIC(ADDHEAD(&StackFreeList, (Node *)CurrentProcess->stack_base)); /* * NOTE: At this point the first two words of what used -- 2.25.1