diff options
author | Avi Kivity <avi@redhat.com> | 2012-02-08 15:05:50 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-02-29 13:44:41 +0200 |
commit | 72e22d2fe17b85e56b4f0c437c61c6e2de97b308 (patch) | |
tree | 73cc81e1fcb9d4c871e1d25c37000f09174c2138 /memory.h | |
parent | 946996e9c1b0b7b4a6dc56b253e947ea90d24ec4 (diff) |
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.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; }; /** |