- // make sure the reference is relative to process table
- llist_init_head(&process->children);
- llist_init_head(&process->grp_member);
+ llist_init_head(&proc->mm.regions);
+ llist_init_head(&proc->children);
+ llist_init_head(&proc->grp_member);
+
+ return proc;
+}
+
+void
+commit_process(struct proc_info* process)
+{
+ assert(process == &sched_ctx._procs[process->pid]);
+
+ if (process->state != PROC_CREATED) {
+ __current->k_status = LXINVL;
+ return;
+ }