diff options
| author | Aleksa Vuckovic <aleksav013@gmail.com> | 2022-12-03 17:47:58 +0100 |
|---|---|---|
| committer | Aleksa Vuckovic <aleksav013@gmail.com> | 2022-12-03 17:47:58 +0100 |
| commit | 0882221263aa14669946f57578d3ee014493f58f (patch) | |
| tree | 2ca87631b3683ba8a7df8621bbb5f053ff8f165f /kernel/include/process.h | |
| parent | ae5499137e377e08feb523c08b26495e79ed16df (diff) | |
scheduler base
Diffstat (limited to 'kernel/include/process.h')
| -rw-r--r-- | kernel/include/process.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/kernel/include/process.h b/kernel/include/process.h new file mode 100644 index 0000000..7e8f59d --- /dev/null +++ b/kernel/include/process.h @@ -0,0 +1,25 @@ +#ifndef PROCESS_H +#define PROCESS_H + +#include <registers.h> +#include <libk/list.h> + +#define STATUS_READY 0 +#define STATUS_RUNNING 1 +#define STATUS_WAITING 2 + +struct process_t { + registers_t registers; + list_t* next; + uint32_t status; + uint32_t pid; + uint32_t time_using_cpu; +}; +typedef struct process_t process_t; + +extern process_t process_list; +extern process_t current_process; + +void create_process(uint64_t rip, uint64_t param1, uint64_t param2); + +#endif |
