From 9fa85569ba6785576af675d6cb74323bbc937050 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 26 Jul 2021 19:44:10 +0200 Subject: rename process_new() to process_seed() it's only meant to create the root process, the old name could've been misleading --- src/kernel/main.c | 2 +- src/kernel/proc.c | 2 +- src/kernel/proc.h | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/kernel/main.c b/src/kernel/main.c index 894ce18..7864699 100644 --- a/src/kernel/main.c +++ b/src/kernel/main.c @@ -7,7 +7,7 @@ #include static void run_init(struct kmain_info *info) { - struct process *proc = process_new(); + struct process *proc = process_seed(); void *init_base = (void*) 0x200000; // map the module as rw diff --git a/src/kernel/proc.c b/src/kernel/proc.c index 36c88b5..8a80754 100644 --- a/src/kernel/proc.c +++ b/src/kernel/proc.c @@ -7,7 +7,7 @@ struct process *process_first; struct process *process_current; -struct process *process_new() { +struct process *process_seed() { struct process *proc = page_alloc(1); // TODO kmalloc proc->pages = pagedir_new(); proc->state = PS_RUNNING; diff --git a/src/kernel/proc.h b/src/kernel/proc.h index 6d1ed8c..f5b943a 100644 --- a/src/kernel/proc.h +++ b/src/kernel/proc.h @@ -18,7 +18,8 @@ struct process { extern struct process *process_first; extern struct process *process_current; -struct process *process_new(); +// creates the root process +struct process *process_seed(); struct process *process_clone(struct process *orig); _Noreturn void process_switch(struct process *proc); -- cgit v1.2.3