X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fkern%2Fproc.c;h=32e3afe8a2f50b317af65291fa9f0d86fcc3f7b2;hb=58428f4468f39e670f16a9ec5392b49a4a3b50a6;hp=800fc8e1fb0f532ec5d441e679b89213afe584dd;hpb=47a9cfcdead541aeaff4f6ad4039c41024568d62;p=bertos.git diff --git a/bertos/kern/proc.c b/bertos/kern/proc.c index 800fc8e1..32e3afe8 100644 --- a/bertos/kern/proc.c +++ b/bertos/kern/proc.c @@ -199,11 +199,13 @@ struct Process *proc_new_with_name(UNUSED(const char *, name), void (*entry)(voi proc_init_struct(proc); proc->user_data = data; -#if CONFIG_KERN_HEAP +#if CONFIG_KERN_HEAP | CONFIG_KERN_MONITOR | (ARCH & ARCH_EMUL) proc->stack_base = stack_base; proc->stack_size = stack_size; + #if CONFIG_KERN_HEAP if (free_stack) proc->flags |= PF_FREESTACK; + #endif #endif /* Initialize process stack frame */ @@ -218,7 +220,7 @@ struct Process *proc_new_with_name(UNUSED(const char *, name), void (*entry)(voi ATOMIC(SCHED_ENQUEUE(proc)); #if CONFIG_KERN_MONITOR - monitor_add(proc, name, stack_base, stack_size); + monitor_add(proc, name); #endif return proc;