From: bernie Date: Mon, 18 Aug 2008 16:54:41 +0000 (+0000) Subject: proc_new(): thinko: add new processes to the ready list also in the preempt case X-Git-Tag: 2.0.0~273 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=ae6e3f6a2550476243c60b6c574ff82dc014111a;p=bertos.git proc_new(): thinko: add new processes to the ready list also in the preempt case git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1661 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/kern/proc.c b/bertos/kern/proc.c index d4f980af..16e171de 100644 --- a/bertos/kern/proc.c +++ b/bertos/kern/proc.c @@ -218,13 +218,13 @@ struct Process *proc_new_with_name(UNUSED(const char *, name), void (*entry)(voi /* Push a clean set of CPU registers for asm_switch_context() */ for (i = 0; i < CPU_SAVED_REGS_CNT; i++) CPU_PUSH_WORD(proc->stack, CPU_REG_INIT_VALUE(i)); - - /* Add to ready list */ - ATOMIC(SCHED_ENQUEUE(proc)); - ATOMIC(LIST_ASSERT_VALID(&ProcReadyList)); } #endif // CONFIG_KERN_PREEMPT + /* Add to ready list */ + ATOMIC(SCHED_ENQUEUE(proc)); + ATOMIC(LIST_ASSERT_VALID(&ProcReadyList)); + #if CONFIG_KERN_MONITOR monitor_add(proc, name); #endif