aboutsummaryrefslogtreecommitdiff
path: root/kernel/inc
diff options
context:
space:
mode:
authorMarvin Borner2021-01-20 23:22:32 +0100
committerMarvin Borner2021-01-20 23:22:32 +0100
commit64ccbef99bdadc816e8c756ca8b5ae9a148a47fd (patch)
treedc53211d20a6b711b5076cbb46119c42f77caae6 /kernel/inc
parent1ca3f322c81544ba769a0cd44fbd4bf03a8f875d (diff)
Added proc wait struct with function
Diffstat (limited to 'kernel/inc')
-rw-r--r--kernel/inc/proc.h8
1 files changed, 7 insertions, 1 deletions
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);