qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/2] qemu-sem-posix: use monotonic clock instead
@ 2022-02-21  9:56 Longpeng(Mike) via
  2022-02-21  9:56 ` [RFC 1/2] sem-posix: remove the posix semaphore support Longpeng(Mike) via
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Longpeng(Mike) via @ 2022-02-21  9:56 UTC (permalink / raw)
  To: pbonzini, berrange, mst; +Cc: qemu-devel, arei.gonglei, Longpeng(Mike)

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.

Longpeng (Mike) (2):
  sem-posix: remove the posix semaphore support
  sem-posix: use monotonic clock instead

 include/qemu/thread-posix.h |  5 +--
 meson.build                 | 12 ++++++-
 util/qemu-thread-posix.c    | 82 +++++++++++++++------------------------------
 3 files changed, 39 insertions(+), 60 deletions(-)

-- 
1.8.3.1



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-02-23 10:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-21  9:56 [RFC 0/2] qemu-sem-posix: use monotonic clock instead Longpeng(Mike) via
2022-02-21  9:56 ` [RFC 1/2] sem-posix: remove the posix semaphore support Longpeng(Mike) via
2022-02-21 11:11   ` Daniel P. Berrangé
2022-02-21 14:35     ` longpeng2--- via
2022-02-23  9:42     ` Paolo Bonzini
2022-02-21  9:56 ` [RFC 2/2] sem-posix: use monotonic clock instead Longpeng(Mike) via
2022-02-21 11:42   ` Paolo Bonzini
2022-02-21 14:39     ` longpeng2--- via
2022-02-21 11:31 ` [RFC 0/2] qemu-sem-posix: " Paolo Bonzini
2022-02-21 14:37   ` longpeng2--- via

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).