diff options
Diffstat (limited to 'src/core/scheduler.hpp')
| -rw-r--r-- | src/core/scheduler.hpp | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/src/core/scheduler.hpp b/src/core/scheduler.hpp index 15b4caf..17b7f96 100644 --- a/src/core/scheduler.hpp +++ b/src/core/scheduler.hpp @@ -4,24 +4,32 @@ #define MAX_TASK 5 #define TASK_VMA 0x0 +#if (TASK_VMA % 0x7) + #error TASK_VMA value is not 4096 bits aligned! +#endif +// DO NOT CHANGE THE FOLLOWING STRUCTURE WITHOUT CONCIDERING UPDATING +// THE SWITCH FUNCTION INTO scheduler_asm.S typedef struct { - u32 rax, rbx, rcx, rdx; - u32 cs, rip; - u32 ss, rsp, rbp; - u32 rsi, rdi; - u32 ds, es, fs, gs; - u32 eflags; - u32 ss0, rsp0; + u64 rax, rbx, rcx, rdx; + u64 cs, rip; + u64 ss, rsp, rbp; + u64 rsi, rdi; + u64 ds, es, fs, gs; + u64 eflags; + u64 rsp0; + u64 r8,r9,r10,r11,r12,r13,r14,r15; } __attribute__((packed)) REGS; +// DO NOT CHANGE THE FOLLOWING STRUCTURE WITHOUT CONCIDERING UPDATING +// THE SWITCH FUNCTION INTO scheduler_asm.S typedef struct { + u64* pml4; + REGS registers; u32 id; u32 pid; - u64* pml4; u32 size; - REGS registers; -} __attribute__((packed)) TASK; +} __attribute__((packed)) PROC; extern char show_ticks; |
