aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/tasks/task.h
blob: 081b001e1a1f33673f987cb92a5da979a23ae433 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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;
	uint32_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 exec(uint32_t binary);

#endif