From 195801d700c008b6a8d8acfa299aa5f177446647 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Tue, 2 Jan 2024 10:35:25 -0500 Subject: system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Big QEMU Lock (BQL) has many names and they are confusing. The actual QemuMutex variable is called qemu_global_mutex but it's commonly referred to as the BQL in discussions and some code comments. The locking APIs, however, are called qemu_mutex_lock_iothread() and qemu_mutex_unlock_iothread(). The "iothread" name is historic and comes from when the main thread was split into into KVM vcpu threads and the "iothread" (now called the main loop thread). I have contributed to the confusion myself by introducing a separate --object iothread, a separate concept unrelated to the BQL. The "iothread" name is no longer appropriate for the BQL. Rename the locking APIs to: - void bql_lock(void) - void bql_unlock(void) - bool bql_locked(void) There are more APIs with "iothread" in their names. Subsequent patches will rename them. There are also comments and documentation that will be updated in later patches. Signed-off-by: Stefan Hajnoczi Reviewed-by: Paul Durrant Acked-by: Fabiano Rosas Acked-by: David Woodhouse Reviewed-by: Cédric Le Goater Acked-by: Peter Xu Acked-by: Eric Farman Reviewed-by: Harsh Prateek Bora Acked-by: Hyman Huang Reviewed-by: Akihiko Odaki Message-id: 20240102153529.486531-2-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi --- hw/s390x/s390-skeys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/s390x') diff --git a/hw/s390x/s390-skeys.c b/hw/s390x/s390-skeys.c index 8f5159d85d..5c535d483e 100644 --- a/hw/s390x/s390-skeys.c +++ b/hw/s390x/s390-skeys.c @@ -153,7 +153,7 @@ void qmp_dump_skeys(const char *filename, Error **errp) goto out; } - assert(qemu_mutex_iothread_locked()); + assert(bql_locked()); guest_phys_blocks_init(&guest_phys_blocks); guest_phys_blocks_append(&guest_phys_blocks); -- cgit v1.2.3