]>
wirehaze git hosting - ppos.git/blob - ppos/test/pingpong-contab-stress.c
1 // PingPongOS - PingPong Operating System
2 // Prof. Carlos A. Maziero, DINF UFPR
3 // Versão 2.0 -- Junho de 2025
5 // ATENÇÃO: ESTE ARQUIVO NÃO DEVE SER ALTERADO;
6 // ALTERAÇÕES SERÃO DESCARTADAS NA CORREÇÃO.
8 // Teste da contabilização com muitas tarefas (stress)
17 static struct task_t
*task
[NUMTASKS
];
19 // simula um processamento pesado
24 for (int i
= 0; i
< n
; i
++)
25 for (int j
= 0; j
< n
; j
++)
33 for (int i
= 0; i
< 3; i
++)
38 // corpo da tarefa principal
39 void user_main(void *arg
)
41 printf("user: inicio\n");
44 printf("Creating %d tasks\n", NUMTASKS
);
45 for (int i
= 0; i
< NUMTASKS
; i
++)
47 task
[i
] = task_create(NULL
, body
, NULL
);
51 printf("user: fim\n");