2026-06-26 20:05:01 -05:00
|
|
|
#ifndef KPROCESS_H
|
|
|
|
|
#define KPROCESS_H
|
|
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
|
STATE_READY,
|
|
|
|
|
STATE_SLEEPING,
|
2026-06-28 17:58:58 -05:00
|
|
|
STATE_BLOCKED,
|
2026-06-26 20:05:01 -05:00
|
|
|
STATE_DEAD
|
|
|
|
|
} process_state_t;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
uint32_t pid;
|
|
|
|
|
uint32_t esp;
|
2026-06-30 19:26:31 -05:00
|
|
|
uint32_t esp0;
|
2026-06-26 20:05:01 -05:00
|
|
|
uint32_t cr3;
|
|
|
|
|
process_state_t state;
|
|
|
|
|
uint32_t sleep;
|
2026-06-28 17:58:58 -05:00
|
|
|
void* next;
|
2026-06-29 17:00:07 -05:00
|
|
|
uint32_t heap_end;
|
2026-06-26 20:05:01 -05:00
|
|
|
} __attribute__((packed)) process_t;
|
|
|
|
|
|
|
|
|
|
#endif
|