#include #include #include #include #include #include #include #include "monano.h" #include "task_parameter.h" #include "nthread.h" struct pthread_monano_attr_t param_file[NTHREAD]; /* To store task parameters */ pthread_monano_attr_t* pthread_monano_task_parameters (pthread_monano_t *t, int nb) { // assign parameters of task T0 // assign wcet param_file[0].wcet.tv_sec=3; param_file[0].wcet.tv_nsec=0; // assign period param_file[0].period.tv_sec=18; param_file[0].period.tv_nsec=0; // assign deadline param_file[0].deadline.tv_sec=18; param_file[0].deadline.tv_nsec=0; // assign priority param_file[0].priority= 2; // assign parameters of task T1 // assign wcet param_file[1].wcet.tv_sec=2; param_file[1].wcet.tv_nsec=0; // assign period param_file[1].period.tv_sec=6; param_file[1].period.tv_nsec=0; // assign deadline param_file[1].deadline.tv_sec=6; param_file[1].deadline.tv_nsec=0; // assign priority param_file[1].priority= 3; // assign parameters of task T2 // assign wcet param_file[2].wcet.tv_sec=1; param_file[2].wcet.tv_nsec=0; // assign period param_file[2].period.tv_sec=18; param_file[2].period.tv_nsec=0; // assign deadline param_file[2].deadline.tv_sec=18; param_file[2].deadline.tv_nsec=0; // assign priority param_file[2].priority= 1; // assign parameters of task T3 // assign wcet param_file[3].wcet.tv_sec=5; param_file[3].wcet.tv_nsec=0; // assign period param_file[3].period.tv_sec=18; param_file[3].period.tv_nsec=0; // assign deadline param_file[3].deadline.tv_sec=18; param_file[3].deadline.tv_nsec=0; // assign priority param_file[3].priority= 4; return param_file; }