From 1e561e9f63e1afb726876e5fadb1255e14f8a44c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Wed, 25 Sep 2019 15:37:24 +0200 Subject: [PATCH] cpu/lpc2387: increase 'pthread_reaper' stacksize At the time of configuration, the pthread-reaper uses '164' bytes of stack when 'idle' stack is only '160'. By having double it gives some margin. ps pid | name | state Q | pri | stack ( used) | base addr | current 1 | idle | pending Q | 15 | 160 ( 128) | 0x4000007c | 0x4000009c 2 | main | running Q | 7 | 2560 ( 1232) | 0x4000011c | 0x4000095c 3 | pthread-reaper | bl rx _ | 0 | 320 ( 164) | 0x40000bac | 0x40000c48 | SUM | | | 3040 ( 1524) --- cpu/lpc2387/include/cpu_conf.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cpu/lpc2387/include/cpu_conf.h b/cpu/lpc2387/include/cpu_conf.h index 02b22435cf..9f37cb9f0f 100644 --- a/cpu/lpc2387/include/cpu_conf.h +++ b/cpu/lpc2387/include/cpu_conf.h @@ -52,6 +52,15 @@ extern "C" { #define THREAD_STACKSIZE_IDLE (160) /** @} */ +/** + * @name Pthread configuration + * @{ + */ +/* The idle stack of '160' is not enough to do the 'msg_receive'. + * It currently used '164' bytes. */ +#define CONFIG_PTHREAD_REAPER_BASE_STACKSIZE (2*THREAD_STACKSIZE_IDLE) +/** @} */ + /** * @name Compiler specifics * @{