Process linked list

This commit is contained in:
2026-01-31 14:13:48 +01:00
parent 6e633b44b7
commit c46157fad0
8 changed files with 153 additions and 2 deletions

26
src/sched/process.h Normal file
View File

@@ -0,0 +1,26 @@
#ifndef PROCESS_H
#define PROCESS_H
typedef enum
{
READY,
RUNNING,
DEAD
} status_t;
struct process_t
{
status_t status;
struct cpu_status_t* context;
struct process_t* next;
};
void process_init();
struct process_t* process_create();
void process_add(struct process_t** processes_list, struct process_t* process);
void process_delete(struct process_t** processes_list, struct process_t* process);
struct process_t* process_get_next(struct process_t* process);
void process_display_list(struct process_t* processes_list);
#endif