From 2dcafe56095edd5c07139d7b150a4c8321cd83ee Mon Sep 17 00:00:00 2001 From: arighi Date: Fri, 19 Mar 2010 11:25:27 +0000 Subject: [PATCH] demo: use kernel heap memory pool for the monitor stack if CONFIG_KERN_HEAP is enabled. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3245 38d2e660-2303-0410-9eaa-f027e97ec537 --- examples/demo/demo.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/demo/demo.c b/examples/demo/demo.c index 559152a7..b5b2ca04 100644 --- a/examples/demo/demo.c +++ b/examples/demo/demo.c @@ -294,8 +294,11 @@ static struct MenuItem main_items[] = }; static struct Menu main_menu = { main_items, "Main Menu", MF_STICKY, &lcd_bitmap, 0 }; - -static cpu_stack_t monitor_stack[CONFIG_KERN_MINSTACKSIZE / sizeof(cpu_stack_t)]; +#if CONFIG_KERN_HEAP +#define monitor_stack NULL +#else +static PROC_DEFINE_STACK(monitor_stack, KERN_MINSTACKSIZE); +#endif int main(int argc, char *argv[]) { @@ -306,7 +309,7 @@ int main(int argc, char *argv[]) kbd_init(); lcd_init(); proc_init(); - monitor_start(sizeof(monitor_stack), monitor_stack); + monitor_start(KERN_MINSTACKSIZE, monitor_stack); menu_handle(&main_menu); -- 2.25.1