From: bernie Date: Sun, 24 Aug 2008 06:37:08 +0000 (+0000) Subject: proc_exit(): Free the correct stack base pointer. X-Git-Tag: 2.0.0~256 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=e76058eccdb846a6a9f9da7cac4f22f6e41a7afc;p=bertos.git proc_exit(): Free the correct stack base pointer. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1678 38d2e660-2303-0410-9eaa-f027e97ec537 --- 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