#ifndef BENCHMARK_H #define BENCHMARK_H yes #include #include #include #include #include #include #include #include #include #include "returncode.h" #include "monano.h" #include "monano_data.h" #include "measure.h" #include "time_conversion.h" #include "nthread.h" extern struct pthread_monano_t my_monano; extern pthread_monano_id_t my_monano_id[NTHREAD]; extern struct pthread_monano_attr_t tparam[CONFIGURE_MAXIMUM_MONANO_THREAD_NUMBER]; extern sem_t prec_const; extern pthread_mutex_t non_preemptive; typedef struct periodic_activation_parameters { int ego; int precedency_blocking; int non_preemptive; int preemption_delay; int delay_execution; int asynchronous; int self_suspension; }periodic_activation_parameters; long long benchmark_timespec_to_nanoseconds(struct timespec ts); struct timespec benchmark_nanoseconds_to_timespec(long long); struct timespec benchmark_random_execution_time(struct timespec); void* benchmark_my_callback(int anomaly_number, pthread_monano_id_t id); void* benchmark_periodic_activation(void* arg); void benchmark_periodic_activation_parameter_init(struct periodic_activation_parameters* p); void benchmark_init(void); /*to simulate the time execution of a thread*/ int benchmark_simulate_thread_execution(pthread_monano_t* t, pthread_monano_id_t id); /*to simulate interruption time of a thread*/ int benchmark_simulate_thread_interruption(struct timespec h); #endif