X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=contrib%2Ffsm_checker%2FRT_CHECK%2Frealtime.h;fp=contrib%2Ffsm_checker%2FRT_CHECK%2Frealtime.h;h=1b890bb89a0fe26fe1638c9e687dbf53ee3d7a64;hb=e09e518ebf18d490dbeb72c6358968af7d05d675;hp=0000000000000000000000000000000000000000;hpb=58f53b56557577b64911d0e7a2bba3fbb521d71d;p=lttv.git diff --git a/contrib/fsm_checker/RT_CHECK/realtime.h b/contrib/fsm_checker/RT_CHECK/realtime.h new file mode 100755 index 00000000..1b890bb8 --- /dev/null +++ b/contrib/fsm_checker/RT_CHECK/realtime.h @@ -0,0 +1,34 @@ +#include +#define DEFAULT_PERIOD_SEC 0 +#define DEFAULT_PERIOD_NSEC 500000000 //500ms + +#define DEFAULT_RUNNING_TIME_SEC 0 +#define DEFAULT_RUNNING_TIME_NSEC 500000000 //500ms + + + +struct realtime{ + int pid; //set by checker + long period_sec; //tolerable period + long period_nsec; + long running_time_sec; //needed time to execute per scheduling cycle + long running_time_nsec; + long schedin_ts_sec; + long schedin_ts_nsec; + struct realtimeContext _fsm; + +}; +struct realtime * realtime_Init(int, long, long, long, long); + +void realtime_warning(struct realtime *, long, long); + +void realtime_report_insufficient_scheduling_time(struct realtime *, long, long); + +void realtime_save_ts(struct realtime *, long, long); + +int latency(struct realtime *, long, long); + +int running_enough(struct realtime *, long, long); + +void removefsm(struct realtime *rtstruct); +