summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordzwdz2021-07-26 19:44:10 +0200
committerdzwdz2021-07-26 19:44:10 +0200
commit9fa85569ba6785576af675d6cb74323bbc937050 (patch)
tree25edf2a4102398192c86de9297571f14069f79ac /src
parent3c8cc57cd1d7b04ab92dc80bc0e0c9a481d905f8 (diff)
rename process_new() to process_seed()
it's only meant to create the root process, the old name could've been misleading
Diffstat (limited to 'src')
-rw-r--r--src/kernel/main.c2
-rw-r--r--src/kernel/proc.c2
-rw-r--r--src/kernel/proc.h3
3 files changed, 4 insertions, 3 deletions
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 <stdint.h>
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);