proc_switch(): rename from proc_schedule(). Split out the real cooperative scheduler.
authorbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 25 Aug 2008 19:24:43 +0000 (19:24 +0000)
committerbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 25 Aug 2008 19:24:43 +0000 (19:24 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1702 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/kern/preempt.c

index e24da145ba1c38ee09fc9363060c9bb0e46aec39..a9201f61cb7a8413e093d77038e128620d536a1e 100644 (file)
@@ -101,7 +101,7 @@ void proc_preempt(UNUSED_ARG(void *, param)
 
                TRACEMSG("preempting %p:%s", CurrentProcess, proc_currentName());
 
-// FIXME: this still break havocs, probably because of some reentrancy issue
+// FIXME: this still breaks havoc, probably because of some reentrancy issue
 #if 0
                SCHED_ENQUEUE(CurrentProcess);
                proc_schedule();
@@ -127,7 +127,7 @@ void proc_switch(void)
        IRQ_ASSERT_ENABLED();
        ASSERT(preempt_forbid_cnt == 0);
 
-       // Will invoke proc_preempt() in interrupt context
+       // Will invoke proc_switch() in interrupt context
        kill(0, SIGUSR1);
 }
 
@@ -153,7 +153,7 @@ void preempt_init(void)
        MOD_CHECK(irq);
        MOD_CHECK(timer);
 
-       irq_register(SIGUSR1, proc_preempt);
+       irq_register(SIGUSR1, proc_schedule);
 
        timer_setSoftint(&preempt_timer, proc_preempt_timer, NULL);
        timer_setDelay(&preempt_timer, CONFIG_KERN_QUANTUM);