diff options
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 |