]> wirehaze git hosting - ppos.git/blobdiff - ppos/kernel/tcb.h

wirehaze git hosting

tasks implementation (ongoing)
[ppos.git] / ppos / kernel / tcb.h
index d93897a9285a2372ef6b9aca14f0b4ce633df9d1..230bcdfc6b3cf63556e6fb1351905a72d1836d29 100644 (file)
@@ -9,13 +9,23 @@
 
 #include "ctx.h"
 
 
 #include "ctx.h"
 
-// Task Control Block (TCB), infos sobre uma tarefa
-struct task_t
+/* TODO  */
+enum task_status
 {
 {
-    int id;                     // identificador da tarefa
-    char *name;                 // nome da tarefa
-    struct ctx_t context;       // contexto armazenado da tarefa
-                                // ...
+  STATUS_READY,
+  STATUS_RUNNING,
+  STATUS_SUSPENDED,
+  STATUS_TERMINATED
+};
+
+/* Task Control Block.  */
+struct task_t
+{/* TODO comment fields.  */
+  int id;
+  char *name;
+  enum task_status status;
+  struct task_t *parent;
+  struct ctx_t context;
 };
 
 #endif
 };
 
 #endif