42_KFS/headers/task.h

24 lines
363 B
C
Raw Normal View History

#pragma once
#include "list.h"
#include <stdint.h>
enum status { ZOMBIE, THREAD, RUN };
struct task {
uint32_t *esp;
uint32_t *esp0;
uint32_t *cr3;
uint16_t pid;
uint8_t status;
struct task *daddy;
struct task *child;
struct list **signals;
uint8_t owner_id;
struct task *next;
};
void scheduler(void);
void switch_to_task(struct task *next_task);