gonna ask tsoding for help, fuck this shit
This commit is contained in:
+13
-19
@@ -35,29 +35,23 @@ typedef struct __attribute__((packed)) Context {
|
||||
|
||||
// Структура trap frame для перехода в ring 3
|
||||
typedef struct __attribute__((packed)) TrapFrame {
|
||||
uint32_t edi;
|
||||
uint32_t esi;
|
||||
uint32_t ebp;
|
||||
uint32_t ebx; // Убрано oesp
|
||||
uint32_t edx;
|
||||
uint32_t ecx;
|
||||
uint32_t eax;
|
||||
uint16_t gs;
|
||||
uint16_t fs;
|
||||
uint16_t es;
|
||||
uint16_t ds;
|
||||
uint32_t trapno;
|
||||
uint32_t err;
|
||||
uint32_t eip;
|
||||
uint32_t cs;
|
||||
uint32_t eflags;
|
||||
uint32_t esp;
|
||||
uint32_t ss;
|
||||
uint32_t gs,fs,es,ds;
|
||||
uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax;
|
||||
|
||||
uint32_t interrupt, error;
|
||||
|
||||
uint32_t eip, cs, eflags, usermode_esp, usermode_ss;
|
||||
|
||||
} TrapFrame;
|
||||
|
||||
typedef struct Process
|
||||
{
|
||||
uint32_t pid; // Process ID
|
||||
|
||||
uint32_t kesp;
|
||||
uint32_t kesp_bottom;
|
||||
uint32_t *pagedir;
|
||||
|
||||
TaskState state; // Состояние процесса
|
||||
char* kstack; // Стек ядра
|
||||
Context* context; // Контекст для переключения
|
||||
@@ -67,7 +61,7 @@ typedef struct Process
|
||||
uint32_t* page_directory; // Директория страниц
|
||||
} Process;
|
||||
|
||||
Process* task_create(EntryPoint func, void** args, uint32_t arg_count, uint32_t ring);
|
||||
Process* task_create(uint32_t func, void** args, uint32_t arg_count, uint32_t ring);
|
||||
void scheduler_init();
|
||||
void schedule();
|
||||
void scheduler_lock();
|
||||
|
||||
Reference in New Issue
Block a user