Prior to this change, the update thread was only checking on
device_update_needed. However, this causes an issue when calling any of
the set methods where the update thread fires, fails to find a device,
and signals the acquisition thread every 50 ms, since the update flag
was never cleared.
This change adds a thread enable flag for the update thread. The update
thread will check that both the thread enable flag and the update needed
flag are set before proceeding with the call to libx52_update.
Some libx52 APIs, notably the clock related ones, can return
LIBX52_ERROR_TRY_AGAIN. This is not a real error, but it is useful
information. It indicates to the application that there is no change
applied to the internal state, and that it should wait until trying
again.
Given that the clock thread calls the libx52_set_clock method every
second, treating the TRY_AGAIN state as a failure and logging it causes
a lot of spurious noise in the logs. This change ensures that the API
returns a real error before logging it.
Having the trace log in there adds unnecessary logging for no real
reason. It is better to disable the log here to help trace other
portions of the daemon.
Commit 2ce9ff22 replaced the calls to AX_PKG_CHECK_MODULES with
PKG_CHECK_MODULES, but it was done blindly, since PKG_CHECK_MODULES
takes a different number of arguments. As a result, even if the checks
for cmocka and udev succeed, they are still disabled because the
corresponding have_ variable is not set to 'yes'.
321d9aa Add benchmark program to tests
a6e789e Remove config.h.in - this is autogenerated
a3eb2c0 Add method to close output stream and reset to default
fb9b51a Fix format-literal error in clang
git-subtree-dir: lib/pinelog
git-subtree-split: 321d9aaa0eee4b4af4be52c228662c3d32c32ab6