#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=1; param_file[0].wcet.tv_nsec=0; // assign period param_file[0].period.tv_sec=4; param_file[0].period.tv_nsec=0; // assign deadline param_file[0].deadline.tv_sec=4; param_file[0].deadline.tv_nsec=0; // assign priority param_file[0].priority= 4; //assign preemption delay param_file[0].delay.tv_sec=0; param_file[0].delay.tv_nsec=0; // 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=12; param_file[1].period.tv_nsec=0; // assign deadline param_file[1].deadline.tv_sec=12; param_file[1].deadline.tv_nsec=0; // assign priority param_file[1].priority= 3; //assign preemption delay param_file[1].delay.tv_sec=0; param_file[1].delay.tv_nsec=0; //assign parameters of task T2 //assign wcet param_file[2].wcet.tv_sec=3; param_file[2].wcet.tv_nsec=0; //assign period param_file[2].period.tv_sec=12; param_file[2].period.tv_nsec=0; //assign deadline param_file[2].deadline.tv_sec=12; param_file[2].deadline.tv_nsec=0; //assign priority param_file[2].priority=2; //assign preemption delay param_file[2].delay.tv_sec=1; param_file[2].delay.tv_nsec=0; //assign parameters of task T3 //assign wcet param_file[3].wcet.tv_sec=3; param_file[3].wcet.tv_nsec=0; //assign period param_file[3].period.tv_sec=12; param_file[3].period.tv_nsec=0; //assign deadline param_file[3].deadline.tv_sec=12; param_file[3].deadline.tv_nsec=0; //assign priority param_file[3].priority=1; //assign preemption delay param_file[3].delay.tv_sec=1; param_file[3].delay.tv_nsec=0; return param_file; }