]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
timers: properly prefix init_clocks()
authorAlex Bennée <alex.bennee@linaro.org>
Thu, 30 Oct 2025 17:33:02 +0000 (17:33 +0000)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 3 Nov 2025 10:59:32 +0000 (11:59 +0100)
Otherwise we run the risk of name clashing, for example with
stm32l4x5_usart-test.c should we shuffle the includes.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251030173302.1379174-1-alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
include/qemu/timer.h
tests/unit/test-aio-multithread.c
util/main-loop.c
util/qemu-timer.c

index 406d741120302145d1c6f4a9181d39501d1cd204..8b561cd6960bf0fdf5d3a31dd2364db4a1aeb30d 100644 (file)
@@ -786,11 +786,12 @@ static inline int64_t qemu_soonest_timeout(int64_t timeout1, int64_t timeout2)
 }
 
 /**
- * initclocks:
+ * qemu_init_clocks:
+ * @notify_cb: optional call-back for timer expiry
  *
  * Initialise the clock & timer infrastructure
  */
-void init_clocks(QEMUTimerListNotifyCB *notify_cb);
+void qemu_init_clocks(QEMUTimerListNotifyCB *notify_cb);
 
 static inline int64_t get_max_clock_jump(void)
 {
index 0ead6bf34ad1f5998e4dc83c50f35fe828a274ed..c24200a7121c761254f3558bdc1598da771b8fa3 100644 (file)
@@ -443,7 +443,7 @@ static void test_multi_mutex_10(void)
 
 int main(int argc, char **argv)
 {
-    init_clocks(NULL);
+    qemu_init_clocks(NULL);
 
     g_test_init(&argc, &argv, NULL);
     g_test_add_func("/aio/multi/lifecycle", test_lifecycle);
index b8ddda8f5eecf420999ef24538aadec7afda80b9..b462598f76e001ae5f28a27835d20692a5f02559 100644 (file)
@@ -162,7 +162,7 @@ int qemu_init_main_loop(Error **errp)
     int ret;
     GSource *src;
 
-    init_clocks(qemu_timer_notify_cb);
+    qemu_init_clocks(qemu_timer_notify_cb);
 
     ret = qemu_signal_init(errp);
     if (ret) {
index 56f11b6a641f6abf8d44d446a88edbe87d6c61e4..2a6be4c7f95879d8e308c9dc58db8e8a377c0f93 100644 (file)
@@ -637,7 +637,7 @@ static void qemu_virtual_clock_set_ns(int64_t time)
     return cpus_set_virtual_clock(time);
 }
 
-void init_clocks(QEMUTimerListNotifyCB *notify_cb)
+void qemu_init_clocks(QEMUTimerListNotifyCB *notify_cb)
 {
     QEMUClockType type;
     for (type = 0; type < QEMU_CLOCK_MAX; type++) {