feat: input device subsystem to resolve race condition on polling input
[lunaix-os.git] / lunaix-os / includes / lunaix / process.h
index 18cddb94f6d29e4ad947e495af8c329dd74972ab..9686ee074de99ec4fb88c1e4e42703d627d7c907 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <arch/x86/interrupts.h>
 #include <lunaix/clock.h>
+#include <lunaix/ds/waitq.h>
 #include <lunaix/fs.h>
 #include <lunaix/mm/mm.h>
 #include <lunaix/signal.h>
@@ -13,7 +14,7 @@
 // 虽然内核不是进程,但为了区分,这里使用Pid=-1来指代内核。这主要是方便物理页所有权检查。
 #define KERNEL_PID -1
 
-#define PS_STOPPED 0
+#define PS_READY 0
 #define PS_RUNNING 1
 #define PS_TERMNAT 2
 #define PS_DESTROY 4
@@ -60,6 +61,7 @@ struct proc_info
     struct llist_header siblings;
     struct llist_header children;
     struct llist_header grp_member;
+    waitq_t waitqueue;
 
     struct
     {