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

wirehaze git hosting

tasks implementation (ongoing)
[ppos.git] / ppos / kernel / tcb.h
1 // PingPongOS - PingPong Operating System
2 // Prof. Carlos A. Maziero, DINF UFPR
3 // Versão 2.0 -- Junho de 2025
4
5 // TCB - Task Control Block do sistema operacional
6
7 #ifndef __PPOS_TCB__
8 #define __PPOS_TCB__
9
10 #include "ctx.h"
11
12 /* TODO */
13 enum task_status
14 {
15 STATUS_READY,
16 STATUS_RUNNING,
17 STATUS_SUSPENDED,
18 STATUS_TERMINATED
19 };
20
21 /* Task Control Block. */
22 struct task_t
23 {/* TODO comment fields. */
24 int id;
25 char *name;
26 enum task_status status;
27 struct task_t *parent;
28 struct ctx_t context;
29 };
30
31 #endif