From ae6e3f6a2550476243c60b6c574ff82dc014111a Mon Sep 17 00:00:00 2001 From: bernie Date: Mon, 18 Aug 2008 16:54:41 +0000 Subject: [PATCH] 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 --- bertos/kern/proc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.25.1