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

wirehaze git hosting

tasks implementation (ongoing)
[ppos.git] / ppos / kernel / scheduler.h
1 // PingPongOS - PingPong Operating System
2 // Prof. Carlos A. Maziero, DINF UFPR
3 // Versão 2.0 -- Junho de 2025
4
5 // ATENÇÃO: ESTE ARQUIVO NÃO DEVE SER ALTERADO;
6 // ALTERAÇÕES SERÃO DESCARTADAS NA CORREÇÃO.
7
8 #ifndef __PPOS_SCHEDULER__
9 #define __PPOS_SCHEDULER__
10
11 #include "lib/queue.h"
12 #include "tcb.h"
13
14 // inicia o subsistema do escalonador de tarefas
15 void sched_init();
16
17 // função escalonador: devolve a próxima tarefa a escalonar na fila
18 struct task_t *scheduler(struct queue_t *ready_queue);
19
20 // muda a prioridade de uma tarefa
21 void sched_setprio(struct task_t *task, int prio);
22
23 // obtem a prioridade de uma tarefa
24 int sched_getprio(struct task_t *task);
25
26 #endif