From 64ccbef99bdadc816e8c756ca8b5ae9a148a47fd Mon Sep 17 00:00:00 2001
From: Marvin Borner
Date: Wed, 20 Jan 2021 23:22:32 +0100
Subject: Added proc wait struct with function

---
 kernel/inc/proc.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'kernel/inc')

diff --git a/kernel/inc/proc.h b/kernel/inc/proc.h
index 75978e9..30af5b1 100644
--- a/kernel/inc/proc.h
+++ b/kernel/inc/proc.h
@@ -19,13 +19,18 @@
 
 enum proc_state { PROC_RUNNING, PROC_SLEEPING };
 
+struct proc_wait {
+	u32 id; // dev_id
+	u32 (*func)();
+};
+
 struct proc {
 	u32 pid;
 	char name[32];
 	struct regs regs;
 	struct regs regs_backup;
+	struct proc_wait wait; // dev_id
 	enum proc_state state;
-	u32 waits_for; // dev_id
 	struct stack *messages;
 };
 
@@ -36,6 +41,7 @@ struct proc *proc_current(void);
 struct proc *proc_from_pid(u32 pid);
 void proc_exit(struct proc *proc, int status);
 void proc_yield(struct regs *r);
+void proc_clear_quantum();
 void proc_enable_waiting(u32 dev_id);
 struct proc *proc_make(void);
 
-- 
cgit v1.2.3