-#include <sys/abi.h>
-#include <sys/mm/mempart.h>
+#include <asm/abi.h>
+#include <asm/mempart.h>
-#include <sys/cpu.h>
+#include <asm/cpu.h>
#include <lunaix/fs/taskfs.h>
#include <lunaix/mm/cake.h>
#include <lunaix/hart_state.h>
#include <lunaix/kpreempt.h>
-#include <lunaix/generic/isrm.h>
-
#include <klibc/string.h>
struct thread empty_thread_obj;
-volatile struct proc_info* __current;
+volatile struct proc_info* __current = NULL;
volatile struct thread* current_thread = &empty_thread_obj;
struct scheduler sched_ctx;
sched_ctx.procs_index = to_check->process->pid;
done:
- isrm_notify_eos(0);
run(to_check);
fail("unexpected return from scheduler");
;
if (unlikely(i == MAX_PROCESS)) {
- panick("Panic in Ponyville shimmer!");
+ fail("Panic in Ponyville shimmer!");
}
return i;
proc->created = clock_systime();
proc->pgid = proc->pid;
+ proc->root = vfs_sysroot;
+
proc->sigreg = vzalloc(sizeof(struct sigregistry));
proc->fdtable = vzalloc(sizeof(struct v_fdtable));
assert(!kernel_process(proc));
if (proc->pid == 1) {
- panick("Attempt to kill init");
+ fail("Attempt to kill init");
}
terminate_proc_only(proc, exit_code);