summaryrefslogtreecommitdiff
path: root/memory.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2012-02-08 15:05:50 +0200
committerAvi Kivity <avi@redhat.com>2012-02-29 13:44:41 +0200
commit72e22d2fe17b85e56b4f0c437c61c6e2de97b308 (patch)
tree73cc81e1fcb9d4c871e1d25c37000f09174c2138 /memory.h
parent946996e9c1b0b7b4a6dc56b253e947ea90d24ec4 (diff)
downloadqemu-72e22d2fe17b85e56b4f0c437c61c6e2de97b308.tar.gz
qemu-72e22d2fe17b85e56b4f0c437c61c6e2de97b308.tar.bz2
qemu-72e22d2fe17b85e56b4f0c437c61c6e2de97b308.zip
memory: switch memory listeners to a QTAILQ
This allows reverse iteration, which in turns allows consistent ordering among multiple listeners: l1->add l2->add l2->del l1->del Signed-off-by: Avi Kivity <avi@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'memory.h')
-rw-r--r--memory.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/memory.h b/memory.h
index 4763286528..954dc86721 100644
--- a/memory.h
+++ b/memory.h
@@ -185,7 +185,9 @@ struct MemoryListener {
void (*log_sync)(MemoryListener *listener, MemoryRegionSection *section);
void (*log_global_start)(MemoryListener *listener);
void (*log_global_stop)(MemoryListener *listener);
- QLIST_ENTRY(MemoryListener) link;
+ /* Lower = earlier (during add), later (during del) */
+ unsigned priority;
+ QTAILQ_ENTRY(MemoryListener) link;
};
/**