#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) { pthread_monano_precedency_t pred; // assign parameters of task T0 //assign departure param_file[0].departure.tv_sec=2; param_file[0].departure.tv_nsec=0; // assign wcet param_file[0].wcet.tv_sec=1; 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=7; param_file[0].deadline.tv_nsec=0; // assign priority param_file[0].priority= 3; // 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=18; param_file[1].period.tv_nsec=0; // assign deadline param_file[1].deadline.tv_sec=9; param_file[1].deadline.tv_nsec=0; // assign priority param_file[1].priority= 2; // assign parameters of task T2 // assign wcet param_file[2].wcet.tv_sec=5; 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; return param_file; }