]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
treewide: rename qemu_wait_io_event/qemu_wait_io_event_common
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 2 Sep 2025 05:17:09 +0000 (07:17 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 17 Sep 2025 17:00:55 +0000 (19:00 +0200)
Do so before extending it to the user-mode emulators, where there is no
such thing as an "I/O thread".

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
accel/dummy-cpus.c
accel/hvf/hvf-accel-ops.c
accel/kvm/kvm-accel-ops.c
accel/tcg/tcg-accel-ops-mttcg.c
accel/tcg/tcg-accel-ops-rr.c
cpu-common.c
include/hw/core/cpu.h
include/system/cpus.h
system/cpus.c
target/i386/nvmm/nvmm-accel-ops.c
target/i386/whpx/whpx-accel-ops.c

index 03cfc0fa01e65ef4dc7e8bcbe066113a07446276..225a47c31fdb51d89914821caf6e617e9eef203d 100644 (file)
@@ -57,7 +57,7 @@ static void *dummy_cpu_thread_fn(void *arg)
         qemu_sem_wait(&cpu->sem);
 #endif
         bql_lock();
-        qemu_wait_io_event(cpu);
+        qemu_process_cpu_events(cpu);
     } while (!cpu->unplug);
 
     bql_unlock();
index d488d6afbacf6ba45ff41bc537ec29aedef3da6c..7a27bdadb4fde819ede2c0a8cc1b63cd60e40fd6 100644 (file)
@@ -198,7 +198,7 @@ static void *hvf_cpu_thread_fn(void *arg)
                 cpu_handle_guest_debug(cpu);
             }
         }
-        qemu_wait_io_event(cpu);
+        qemu_process_cpu_events(cpu);
     } while (!cpu->unplug || cpu_can_run(cpu));
 
     hvf_vcpu_destroy(cpu);
index b709187c7d769af5aeccf48b5b6ffb76a96dd0d8..65a7f76a69ad699d442069bb68cd7820db519631 100644 (file)
@@ -53,7 +53,7 @@ static void *kvm_vcpu_thread_fn(void *arg)
                 cpu_handle_guest_debug(cpu);
             }
         }
-        qemu_wait_io_event(cpu);
+        qemu_process_cpu_events(cpu);
     } while (!cpu->unplug || cpu_can_run(cpu));
 
     kvm_destroy_vcpu(cpu);
index 1148ebcaae5ef74c0314d222cf122880da738d30..342917c5f6e8c8b303c6a700913d3c5f6f19078f 100644 (file)
@@ -113,7 +113,7 @@ static void *mttcg_cpu_thread_fn(void *arg)
             }
         }
 
-        qemu_wait_io_event(cpu);
+        qemu_process_cpu_events(cpu);
     } while (!cpu->unplug || cpu_can_run(cpu));
 
     tcg_cpu_destroy(cpu);
index a1d75fd34194858fb3a812f2ea88e4ab8856c73a..813b313859ad9deea79719dcd076a4f0ae613beb 100644 (file)
@@ -117,7 +117,7 @@ static void rr_wait_io_event(void)
     rr_start_kick_timer();
 
     CPU_FOREACH(cpu) {
-        qemu_wait_io_event_common(cpu);
+        qemu_process_cpu_events_common(cpu);
     }
 }
 
@@ -203,7 +203,7 @@ static void *rr_cpu_thread_fn(void *arg)
         /* process any pending work */
         CPU_FOREACH(cpu) {
             current_cpu = cpu;
-            qemu_wait_io_event_common(cpu);
+            qemu_process_cpu_events_common(cpu);
         }
     }
 
index 152661df8e9cd038537adb12bda1450b4d154829..0eb5c7b8f247d71f78e339cd2c94a8a7a7862bd0 100644 (file)
@@ -137,7 +137,7 @@ static void queue_work_on_cpu(CPUState *cpu, struct qemu_work_item *wi)
     wi->done = false;
     qemu_mutex_unlock(&cpu->work_mutex);
 
-    /* exit the inner loop and reach qemu_wait_io_event_common().  */
+    /* exit the inner loop and reach qemu_process_cpu_events_common().  */
     cpu_exit(cpu);
 }
 
index 338757e5254e3b2350e9b12328f7326dffaf058d..6075be0b59fa104e5420c230ec3ffe2a90465e5d 100644 (file)
@@ -422,7 +422,7 @@ struct qemu_work_item;
  * valid under cpu_list_lock.
  * @created: Indicates whether the CPU thread has been successfully created.
  * @halt_cond: condition variable sleeping threads can wait on.
- * @exit_request: Another thread requests the CPU to call qemu_wait_io_event().
+ * @exit_request: Another thread requests the CPU to call qemu_process_cpu_events().
  *   Should be read only by CPU thread with load-acquire, to synchronize with
  *   other threads' store-release operation.
  *
index 69be6a77a75ac763a4cdacd5eb8bcec4098efe5c..4aebec48705d73fcba98516c17ccce39dd9a7c67 100644 (file)
@@ -17,8 +17,8 @@ bool cpu_work_list_empty(CPUState *cpu);
 bool cpu_thread_is_idle(CPUState *cpu);
 bool all_cpu_threads_idle(void);
 bool cpu_can_run(CPUState *cpu);
-void qemu_wait_io_event_common(CPUState *cpu);
-void qemu_wait_io_event(CPUState *cpu);
+void qemu_process_cpu_events_common(CPUState *cpu);
+void qemu_process_cpu_events(CPUState *cpu);
 void cpu_thread_signal_created(CPUState *cpu);
 void cpu_thread_signal_destroyed(CPUState *cpu);
 void cpu_handle_guest_debug(CPUState *cpu);
index bb13942cbb7dc64d3999f81f8542e1e62c63ef53..fd804e073278a3e3db67c179ff2a8799c5813e31 100644 (file)
@@ -450,7 +450,7 @@ static void qemu_cpu_stop(CPUState *cpu, bool exit)
     qemu_cond_broadcast(&qemu_pause_cond);
 }
 
-void qemu_wait_io_event_common(CPUState *cpu)
+void qemu_process_cpu_events_common(CPUState *cpu)
 {
     qatomic_set_mb(&cpu->thread_kicked, false);
     if (cpu->stop) {
@@ -459,7 +459,7 @@ void qemu_wait_io_event_common(CPUState *cpu)
     process_queued_cpu_work(cpu);
 }
 
-void qemu_wait_io_event(CPUState *cpu)
+void qemu_process_cpu_events(CPUState *cpu)
 {
     bool slept = false;
 
@@ -474,7 +474,7 @@ void qemu_wait_io_event(CPUState *cpu)
         qemu_plugin_vcpu_resume_cb(cpu);
     }
 
-    qemu_wait_io_event_common(cpu);
+    qemu_process_cpu_events_common(cpu);
 }
 
 void cpus_kick_thread(CPUState *cpu)
index 86869f133e97e8fc72ca3456b34e8b4d728a8954..d066364b989347b2abab5e2860a1c581e540dc23 100644 (file)
@@ -51,7 +51,7 @@ static void *qemu_nvmm_cpu_thread_fn(void *arg)
         while (cpu_thread_is_idle(cpu)) {
             qemu_cond_wait_bql(cpu->halt_cond);
         }
-        qemu_wait_io_event_common(cpu);
+        qemu_process_cpu_events_common(cpu);
     } while (!cpu->unplug || cpu_can_run(cpu));
 
     nvmm_destroy_vcpu(cpu);
index da58805b1a65e8ecabef700c2f85bd8ea5831cf4..2ca4ee02636c8ede85a237c6d396be29f1c7a35d 100644 (file)
@@ -51,7 +51,7 @@ static void *whpx_cpu_thread_fn(void *arg)
         while (cpu_thread_is_idle(cpu)) {
             qemu_cond_wait_bql(cpu->halt_cond);
         }
-        qemu_wait_io_event_common(cpu);
+        qemu_process_cpu_events_common(cpu);
     } while (!cpu->unplug || cpu_can_run(cpu));
 
     whpx_destroy_vcpu(cpu);