From 4e6384d8153f1476701638e2277043d59755306d Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Tue, 29 Apr 2025 11:13:58 -0400 Subject: change queue structures --- kernel/include/comus/procs.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'kernel/include') diff --git a/kernel/include/comus/procs.h b/kernel/include/comus/procs.h index cf3f90d..7b1a70a 100644 --- a/kernel/include/comus/procs.h +++ b/kernel/include/comus/procs.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -34,11 +35,8 @@ enum proc_state { PROC_STATE_READY, PROC_STATE_RUNNING, // runnable, but waiting for some event - PROC_STATE_SLEEPING, PROC_STATE_BLOCKED, - PROC_STATE_WAITING, // no longer runnalbe - PROC_STATE_KILLED, PROC_STATE_ZOMBIE, // sentinel N_PROC_STATES, @@ -70,6 +68,7 @@ struct pcb { struct pcb *next; // next PDB in queue // process state information + uint64_t syscall; uint64_t wakeup; uint8_t exit_status; }; @@ -89,10 +88,9 @@ typedef struct pcb_queue_s *pcb_queue_t; /// public facing pcb queues extern pcb_queue_t pcb_freelist; -extern pcb_queue_t ready; -extern pcb_queue_t waiting; -extern pcb_queue_t sleeping; -extern pcb_queue_t zombie; +extern pcb_queue_t ready_queue; +extern pcb_queue_t zombie_queue; +extern pcb_queue_t syscall_queue[N_SYSCALLS]; /// pointer to the currently-running process extern struct pcb *current_pcb; -- cgit v1.2.3-freya