diff mbox series

[2/4] cpus: assert that the BQL is held in cpu_get_ticks

Message ID 20180814013801.26036-3-cota@braap.org (mailing list archive)
State New, archived
Headers show
Series x86_64 mttcg | expand

Commit Message

Emilio Cota Aug. 14, 2018, 1:37 a.m. UTC
Signed-off-by: Emilio G. Cota <cota@braap.org>
---
 cpus.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/cpus.c b/cpus.c
index b5844b7103..b23bf6fef7 100644
--- a/cpus.c
+++ b/cpus.c
@@ -308,6 +308,8 @@  int64_t cpu_get_ticks(void)
 {
     int64_t ticks;
 
+    g_assert(qemu_mutex_iothread_locked());
+
     if (use_icount) {
         return cpu_get_icount();
     }