Skip to content

qemu-sem-posix: use monotonic clock instead

Longpeng(Mike) via qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 1 replyIn review
  2. v1 RFC2 patches 7 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3sem-posix: remove the posix semaphore supportinclude/qemu/thread-posix.h meson.build util/qemu-thread-posix.c+0 -590 replies
2/3sem-posix: use monotonic clock insteadmeson.build util/qemu-thread-posix.c+53 -70 replies
3/3sem-posix: refactor qemu-sem with qemu-cond and qemu-mutexinclude/qemu/thread-posix.h util/qemu-thread-posix.c+34 -740 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] qemu-sem-posix: use monotonic clock instead

The qemu_sem_timedwait() uses system time as default, it would be affected by changes to the system time. In the real scenario, the time that goes faster or slower is a common case and the NTP service could help us to sync time periodically.

This patchset uses monotonic clock instead of the realtime clock, this could make sure we would not be affected by the system time anymore.

Changes v1(RFC) -> v2:
Patch 2:
- clean the code [Paolo]
- use pthread_condattr_setclock when initializing qemu-cond. [Paolo]
Patch 3:
- new added, make the qemu-sem code neater. [Longpeng]

Longpeng (Mike) (3):
sem-posix: remove the posix semaphore support
sem-posix: use monotonic clock instead
sem-posix: refactor qemu-sem with qemu-cond and qemu-mutex

 include/qemu/thread-posix.h |   9 +--
 meson.build                 |  12 ++-
 util/qemu-thread-posix.c    | 178 +++++++++++++++-----------------------------
 3 files changed, 73 insertions(+), 126 deletions(-)
Signature · 1 line
1.8.3.1