]> git.proxmox.com Git - mirror_qemu.git/blobdiff - qemu-timer.c
pflash_cfi01: write flash contents to bdrv on incoming migration
[mirror_qemu.git] / qemu-timer.c
index e15ce477ccd55c44f518d348f5a2e4c0e68bf8a6..00a5d35c3f64f5c9a65a5ade0e85273e3555e5c0 100644 (file)
@@ -56,7 +56,7 @@ typedef struct QEMUClock {
 } QEMUClock;
 
 QEMUTimerListGroup main_loop_tlg;
-QEMUClock qemu_clocks[QEMU_CLOCK_MAX];
+static QEMUClock qemu_clocks[QEMU_CLOCK_MAX];
 
 /* A QEMUTimerList is a list of timers attached to a clock. More
  * than one QEMUTimerList can be attached to each clock, for instance
@@ -126,6 +126,9 @@ static void qemu_clock_init(QEMUClockType type)
 {
     QEMUClock *clock = qemu_clock_ptr(type);
 
+    /* Assert that the clock of type TYPE has not been initialized yet. */
+    assert(main_loop_tlg.tl[type] == NULL);
+
     clock->type = type;
     clock->enabled = true;
     clock->last = INT64_MIN;