summary refs log tree commit diff stats
path: root/stubs/iothread-lock.c
diff options
context:
space:
mode:
Diffstat (limited to 'stubs/iothread-lock.c')
-rw-r--r--stubs/iothread-lock.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/stubs/iothread-lock.c b/stubs/iothread-lock.c
index 5467659895..6050c081f5 100644
--- a/stubs/iothread-lock.c
+++ b/stubs/iothread-lock.c
@@ -1,11 +1,17 @@
 #include "qemu/osdep.h"
 #include "qemu/main-loop.h"
 
+static bool bql_is_locked = false;
 static uint32_t bql_unlock_blocked;
 
 bool bql_locked(void)
 {
-    return false;
+    return bql_is_locked;
+}
+
+void rust_bql_mock_lock(void)
+{
+    bql_is_locked = true;
 }
 
 void bql_lock_impl(const char *file, int line)