From 1686173757af4e453e7a32d152ec4bd20d789652 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 1 Aug 2020 18:37:15 +0200 Subject: Started multitasking --- src/inc/proc.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/inc/proc.h (limited to 'src/inc/proc.h') diff --git a/src/inc/proc.h b/src/inc/proc.h new file mode 100644 index 0000000..dc8b9e9 --- /dev/null +++ b/src/inc/proc.h @@ -0,0 +1,22 @@ +// MIT License, Copyright (c) 2020 Marvin Borner + +#ifndef PROC_H +#define PROC_H + +#include +#include + +enum state { PROC_RUNNING, PROC_ASLEEP }; + +struct proc { + u32 pid; + enum state state; + struct regs regs; + /* struct proc *parent; */ + struct proc *next; +}; + +void proc_init(); +struct proc *proc_make(); + +#endif -- cgit v1.2.3