diff --git a/emu.c b/emu.c index ccf0f41..ab501cb 100644 --- a/emu.c +++ b/emu.c @@ -426,6 +426,9 @@ next_event(struct ovni_emu *emu) { err("warning: backwards jump in time %lu -> %lu for tid %d\n", emu->lastclock, stream->lastclock, stream->tid); + + if(emu->enable_linter) + exit(EXIT_FAILURE); } emu->lastclock = stream->lastclock; @@ -756,13 +759,16 @@ parse_args(struct ovni_emu *emu, int argc, char *argv[]) { int opt; - while((opt = getopt(argc, argv, "c:")) != -1) + while((opt = getopt(argc, argv, "c:l")) != -1) { switch(opt) { case 'c': emu->clock_offset_file = optarg; break; + case 'l': + emu->enable_linter = 1; + break; default: /* '?' */ usage(argc, argv); } diff --git a/emu.h b/emu.h index 1e390ac..e31ccf5 100644 --- a/emu.h +++ b/emu.h @@ -449,6 +449,9 @@ struct ovni_emu { /* Counters for statistics */ int64_t nev_processed; + /* Be strict */ + int enable_linter; + FILE *prv_thread; FILE *prv_cpu; FILE *pcf_thread;