os/include/kernel/task.h
2024-11-27 21:57:18 +01:00

41 lines
565 B
C

#include <stdint.h>
#include <stddef.h>
struct CPUState {
size_t eax;
size_t ebx;
size_t ecx;
size_t edx;
size_t eip;
size_t esp;
size_t ebp;
size_t edi;
size_t esi;
size_t cs;
size_t ds;
size_t eflags;
};
struct Task {
struct CPUState state;
};
void switch_task(
size_t eax,
size_t ebx,
size_t ecx,
size_t edx,
size_t ebp,
size_t esp_real,
size_t eip,
size_t cs,
size_t eflags,
size_t esp_fake,
size_t ds
);
void setup_tasks();
void add_task(struct Task task);