From: Alex Bennée Date: Thu, 30 Oct 2025 17:33:02 +0000 (+0000) Subject: timers: properly prefix init_clocks() X-Git-Tag: v10.2.0-rc1~26^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=91634cc3311d28f39ad4b82a8b92c9aeae6e4c51;p=thirdparty%2Fqemu.git timers: properly prefix init_clocks() 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 Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20251030173302.1379174-1-alex.bennee@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- diff --git a/include/qemu/timer.h b/include/qemu/timer.h index 406d741120..8b561cd696 100644 --- a/include/qemu/timer.h +++ b/include/qemu/timer.h @@ -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) { diff --git a/tests/unit/test-aio-multithread.c b/tests/unit/test-aio-multithread.c index 0ead6bf34a..c24200a712 100644 --- a/tests/unit/test-aio-multithread.c +++ b/tests/unit/test-aio-multithread.c @@ -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); diff --git a/util/main-loop.c b/util/main-loop.c index b8ddda8f5e..b462598f76 100644 --- a/util/main-loop.c +++ b/util/main-loop.c @@ -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) { diff --git a/util/qemu-timer.c b/util/qemu-timer.c index 56f11b6a64..2a6be4c7f9 100644 --- a/util/qemu-timer.c +++ b/util/qemu-timer.c @@ -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++) {