diff options
author | Anthony Liguori | 2011-10-24 17:51:12 +0200 |
---|---|---|
committer | Anthony Liguori | 2011-10-24 17:51:12 +0200 |
commit | 952e849c150b4f1b89f8728cba00f925c1d6e75b (patch) | |
tree | 93e950b81e84d1d20a915d8b1da5c75d3911f553 /savevm.c | |
parent | Add stdio char device on windows (diff) | |
parent | simplify main loop functions (diff) | |
download | qemu-952e849c150b4f1b89f8728cba00f925c1d6e75b.tar.gz qemu-952e849c150b4f1b89f8728cba00f925c1d6e75b.tar.xz qemu-952e849c150b4f1b89f8728cba00f925c1d6e75b.zip |
Merge remote-tracking branch 'bonzini/split-main-loop-for-anthony' into staging
Diffstat (limited to 'savevm.c')
-rw-r--r-- | savevm.c | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -81,6 +81,7 @@ #include "migration.h" #include "qemu_socket.h" #include "qemu-queue.h" +#include "qemu-timer.h" #include "cpus.h" #define SELF_ANNOUNCE_ROUNDS 5 @@ -712,6 +713,30 @@ uint64_t qemu_get_be64(QEMUFile *f) return v; } + +/* timer */ + +void qemu_put_timer(QEMUFile *f, QEMUTimer *ts) +{ + uint64_t expire_time; + + expire_time = qemu_timer_expire_time_ns(ts); + qemu_put_be64(f, expire_time); +} + +void qemu_get_timer(QEMUFile *f, QEMUTimer *ts) +{ + uint64_t expire_time; + + expire_time = qemu_get_be64(f); + if (expire_time != -1) { + qemu_mod_timer_ns(ts, expire_time); + } else { + qemu_del_timer(ts); + } +} + + /* bool */ static int get_bool(QEMUFile *f, void *pv, size_t size) |