diff --git a/kernel/sched.c b/kernel/sched.c index a4eb8f9..4ff200f 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -73,7 +73,7 @@ void *sched_process_switch(void *curr_sp) nextpid++; nextpid %= CONFIG_SCHED_MAXTASK; tmp = _sched_tasktab[nextpid]; - if (tmp != NULL && sched_task_should_run(_sched_current_task)) { + if (tmp != NULL && sched_task_should_run(tmp)) { _sched_current_task = tmp; break; }