Process linked list
This commit is contained in:
26
src/sched/process.h
Normal file
26
src/sched/process.h
Normal 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
|
||||
Reference in New Issue
Block a user