Commit Graph

27 Commits

Author SHA1 Message Date
3267ea873f Clean tmp directories when finishing
There were leftover temporal directories when using the OVNI_TMPDIR
variable, as we only remove the proccess ones. This change only attempts
to remove them if they are empty, and doesn't care about race
conditions. The removal process is just "best effort".
2023-11-16 12:39:15 +01:00
927837df25 Don't write thread metadata on flush
The metadata was being written to the final directory, which may be too
slow to accept writes during runtime. The thread metadata needs to be
written anyway at ovni_thread_free() to set the finished flag, so we can
simply skip it.
2023-11-16 12:39:14 +01:00
70e886fcfe Remove old model_version key from proc metadata 2023-11-16 12:39:14 +01:00
72b7eb8332 Mark the finalization of streams
The emulator will now check that all threads are properly finalyzed by
calling ovni_thread_free(), as required by the specification. For now
only a warning is issued, which is enough to determine the cause of
potential emulator panics.

The ovni model is now always enabled.
2023-11-16 12:39:14 +01:00
6f7ce4063f Enable all models if the require key is missing
Allows programs to update to a new libovni library without breaking the
instrumentation. Only until the first call to ovni_thread_require() the
models are enabled on demand.
2023-11-16 12:39:14 +01:00
354f2f50eb Register emulation models only if required
Until now, emulation models were always being registered via probe(),
which causes the emulator to initialize all the channels. To reduce the
overhead, the channels were not connected or registered in the bay
until the first event of that model was received. This delayed connect
was causing issues in muxes where the newly connected model required
refreshing the touched channels. Which in turn was causing unexpected
PRV events.

By determining which models we need to enable, we can remove the delayed
connect mechanism and just enable those models at initialization time,
and connect the channels.
2023-11-16 12:39:05 +01:00
ab42ac4557 Add thread metadata 2023-11-16 12:21:50 +01:00
5d9aef4ed8 Remove rthread and rproc definitions from ovni.h 2023-11-16 12:21:50 +01:00
Kevin Sala
7b4ebca002 Add OVNI_TRACEDIR envar to change trace directory
This commit introduces the OVNI_TRACEDIR environment variable to change
the directory where traces are generated. By default, when the envar is
not defined, the trace is still generated in the ovni directory. The
envar can take a trace directory name, a relative path to the directory,
or its absolute path. In the first case, the directory is created in the
current path $PWD.

Both libovni (rt) and ovnisync read this environment variable.
2023-10-23 07:49:28 +00:00
a3ffb2443a Report the commit too with ovniver 2023-07-26 17:13:28 +02:00
97c936d41f Add ovni_version_get() function
Allows the reding the version of the libovni.so currently loaded.
2023-07-26 16:31:30 +02:00
f8c6b7c7c0 Improve the version error message
Use the terminology want/got to determine which version the user is
requested and the version the library provides.
2023-07-25 19:55:51 +02:00
48df02f102 Always use the project version
Don't duplicated versions so we avoid the problem of missing one
instance to be updated.
2023-07-07 10:42:40 +02:00
4abd92e139 Make ovni.h a public header of ovni target 2023-07-05 13:11:18 +02:00
cd2e844066 Use the installation directories provided by cmake
Some systems will define the library path as lib64. Also update other
install commands to use the values discovered by the GNUInstallDirs
module.
2023-07-05 12:52:56 +02:00
44d120d7a8 Version 1.2.0 2023-05-01 09:19:05 +02:00
a04fc71ae9 Increase libovni version in CMakeLists.txt too 2023-03-24 12:08:45 +00:00
7827ef58e1 Fix minor version check 2023-03-24 12:08:45 +00:00
ddbb7dd9f4 Add include-what-you-use
Adds forwards declarations in headers and includes all headers in
sources, even if they are found by transitive includes.
2023-03-24 12:08:45 +00:00
648411c686 Remove trailing new line in err() and die() 2023-03-24 12:08:45 +00:00
82f1cc287d Update copyright years to 2021-2023 2023-03-24 12:08:45 +00:00
8727126551 Use .obs extension for ovni binary streams 2023-03-24 12:08:45 +00:00
e674c92f13 Enable emu and rt tests for nanos6 and ovni 2023-03-24 12:08:45 +00:00
a4f235dd97 Add .ovnistream suffix to streams 2023-03-24 12:08:45 +00:00
5a982d61c9 Build parson with PIC 2022-12-19 15:24:34 +01:00
7c7ba729f5 Add unit test for the version parser 2022-12-16 13:34:31 +01:00
5404cc5e83 Split sources into src/emu and src/rt
The public includes are now in include/ and in internal includes in
src/include/. The ovni* tools are moved to emu/ovni*.c and liked with
the emu static library.
2022-12-16 13:31:31 +01:00