X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/bffa3430fbbaaad29bec0b5bee9c1f0bfc7fd068..6f65553ca5d2740738f399d88b3a4eb298255427:/lunaix-os/kernel/process/sched.c diff --git a/lunaix-os/kernel/process/sched.c b/lunaix-os/kernel/process/sched.c index 945fc01..be02c57 100644 --- a/lunaix-os/kernel/process/sched.c +++ b/lunaix-os/kernel/process/sched.c @@ -1,7 +1,7 @@ -#include -#include +#include +#include -#include +#include #include #include @@ -20,8 +20,6 @@ #include #include -#include - #include struct thread empty_thread_obj; @@ -221,7 +219,6 @@ schedule() sched_ctx.procs_index = to_check->process->pid; done: - isrm_notify_eos(0); run(to_check); fail("unexpected return from scheduler"); @@ -346,7 +343,7 @@ get_free_pid() { ; if (unlikely(i == MAX_PROCESS)) { - panick("Panic in Ponyville shimmer!"); + fail("Panic in Ponyville shimmer!"); } return i; @@ -449,7 +446,7 @@ commit_process(struct proc_info* process) assert(!proc_terminated(process->parent)); } - if (sched_ctx.proc_list) { + if (likely(sched_ctx.proc_list)) { llist_append(sched_ctx.proc_list, &process->tasks); } else { sched_ctx.proc_list = &process->tasks; @@ -593,7 +590,7 @@ terminate_proccess(struct proc_info* proc, int exit_code) { assert(!kernel_process(proc)); if (proc->pid == 1) { - panick("Attempt to kill init"); + fail("Attempt to kill init"); } terminate_proc_only(proc, exit_code);