diff --git a/include/ovni.h.in b/include/ovni.h.in index 84b0df3..2684e2b 100644 --- a/include/ovni.h.in +++ b/include/ovni.h.in @@ -31,6 +31,9 @@ extern "C" { #define OVNI_STREAM_EXT ".obs" +/* Version of the ovni model for events */ +#define OVNI_MODEL_VERSION "1.1.0" + /* Follow https://semver.org rules for versioning */ #define OVNI_LIB_VERSION "@PROJECT_VERSION@" #define OVNI_GIT_COMMIT "@OVNI_GIT_COMMIT@" diff --git a/src/emu/ovni/setup.c b/src/emu/ovni/setup.c index 32b1980..c9d596a 100644 --- a/src/emu/ovni/setup.c +++ b/src/emu/ovni/setup.c @@ -13,6 +13,7 @@ #include "model_cpu.h" #include "model_pvt.h" #include "model_thread.h" +#include "ovni.h" #include "pv/pcf.h" #include "pv/prv.h" #include "system.h" @@ -47,7 +48,7 @@ static struct ev_decl model_evlist[] = { struct model_spec model_ovni = { .name = model_name, - .version = "1.1.0", + .version = OVNI_MODEL_VERSION, .evlist = model_evlist, .model = model_id, .create = model_ovni_create, diff --git a/src/rt/ovni.c b/src/rt/ovni.c index 4524a73..6157548 100644 --- a/src/rt/ovni.c +++ b/src/rt/ovni.c @@ -535,6 +535,8 @@ ovni_thread_init(pid_t tid) thread_metadata_init(); rthread.ready = 1; + + ovni_thread_require("ovni", OVNI_MODEL_VERSION); } static void