Ensure the timestamp always increases in zero-copy libdlog 01/283301/2
authorMateusz Majewski <m.majewski2@samsung.com>
Fri, 21 Oct 2022 13:08:12 +0000 (15:08 +0200)
committerMateusz Majewski <m.majewski2@samsung.com>
Mon, 24 Oct 2022 06:03:53 +0000 (08:03 +0200)
commit6b3d8b8011ee5db45cc88bd73886c9fede86614e
treef5f7129498f7240a20a0099df5e39861882238d8
parent209efe9cbfe976afdbeaf756a6a1acd004bd3d35
Ensure the timestamp always increases in zero-copy libdlog

The kernel guarantees that it won't decrease, but if function is
executed in quick repetition it might happen that we get the same value
twice in a row. This is unacceptable, since the timestamp is the only
thing we rely on in order to sort the messages.

This mirrors a similar change in the kernel module, see 282866. In the
kernel the issue has been more visible since the kernel might split the
messages in a quite arbitrary way. In userspace the issue has been
harder to notice, but with Marek's changes increasing the performance it
has become more urgent.

Change-Id: I993529a2f8e7f8e477733c929232b10fb981eaba
src/libdlog/log_zero_copy.c