diff options
author | Marvin Borner | 2021-07-01 21:13:01 +0200 |
---|---|---|
committer | Marvin Borner | 2021-07-01 22:32:16 +0200 |
commit | f3e85eedc434da973267f360abdbb79cb6f24100 (patch) | |
tree | 9fd71ec70454474a0a2cff479c7d9b949e779c74 /kernel/inc/proc.h | |
parent | 340e841772eb13d9087235b8707c1cfeff8710cb (diff) |
Timing is everything
Diffstat (limited to 'kernel/inc/proc.h')
-rw-r--r-- | kernel/inc/proc.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/inc/proc.h b/kernel/inc/proc.h index 42ff75d..5cc1fef 100644 --- a/kernel/inc/proc.h +++ b/kernel/inc/proc.h @@ -8,6 +8,7 @@ #include <list.h> #include <stack.h> #include <sys.h> +#include <timer.h> #define PROC_QUANTUM 15 // Milliseconds or something // TODO #define PROC_STACK_SIZE 0x4000 // 16KiB @@ -51,6 +52,11 @@ struct proc { u8 val; u8 cnt; } quantum; + + struct { + enum timer_mode mode; + u32 data; + } timer; }; u32 scheduler(u32 esp); @@ -62,6 +68,7 @@ u8 proc_idle(void); struct proc *proc_from_pid(u32 pid); void proc_exit(s32 status); void proc_yield(void); +void proc_timer_check(u32 time); void proc_set_quantum(struct proc *proc, u32 value) NONNULL; void proc_reset_quantum(struct proc *proc) NONNULL; void proc_state(struct proc *proc, enum proc_state state) NONNULL; |