diff options
author | Marvin Borner | 2020-01-26 18:38:36 +0100 |
---|---|---|
committer | Marvin Borner | 2020-01-26 18:38:36 +0100 |
commit | bb2a6b4d93512e8afc1b1999eb58f1f506cc27ae (patch) | |
tree | ea30b53ac6043faddd1cdb2fdea17f37178b1cc7 /src/kernel/tasks/task.h | |
parent | b8630d78a15a69f50dac747e41e84b143dd99b08 (diff) |
Magic commit
Some things work, others don't.
Diffstat (limited to 'src/kernel/tasks/task.h')
-rw-r--r-- | src/kernel/tasks/task.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/kernel/tasks/task.h b/src/kernel/tasks/task.h new file mode 100644 index 0000000..97aeb15 --- /dev/null +++ b/src/kernel/tasks/task.h @@ -0,0 +1,30 @@ +#ifndef MELVIX_TASK_H +#define MELVIX_TASK_H + +#include <stdint.h> +#include <kernel/memory/paging.h> + +#define KERNEL_STACK_SIZE 2048 + +typedef struct task { + int id; + uint32_t esp, ebp; + uint32_t eip; + page_directory_t *page_directory; + uint32_t kernel_stack; + struct task *next; +} task_t; + +void tasking_install(); + +void switch_task(); + +int fork(); + +void move_stack(void *new_stack_start, uint32_t size); + +int getpid(); + +void switch_to_usermode(uint32_t); + +#endif |