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 <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>
This commit is contained in:
Alex Bennée 2025-10-30 17:33:02 +00:00 committed by Philippe Mathieu-Daudé
parent e9048f099b
commit 91634cc331
4 changed files with 6 additions and 5 deletions

View 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 * 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) static inline int64_t get_max_clock_jump(void)
{ {

View file

@ -443,7 +443,7 @@ static void test_multi_mutex_10(void)
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
init_clocks(NULL); qemu_init_clocks(NULL);
g_test_init(&argc, &argv, NULL); g_test_init(&argc, &argv, NULL);
g_test_add_func("/aio/multi/lifecycle", test_lifecycle); g_test_add_func("/aio/multi/lifecycle", test_lifecycle);

View file

@ -162,7 +162,7 @@ int qemu_init_main_loop(Error **errp)
int ret; int ret;
GSource *src; GSource *src;
init_clocks(qemu_timer_notify_cb); qemu_init_clocks(qemu_timer_notify_cb);
ret = qemu_signal_init(errp); ret = qemu_signal_init(errp);
if (ret) { if (ret) {

View file

@ -637,7 +637,7 @@ static void qemu_virtual_clock_set_ns(int64_t time)
return cpus_set_virtual_clock(time); return cpus_set_virtual_clock(time);
} }
void init_clocks(QEMUTimerListNotifyCB *notify_cb) void qemu_init_clocks(QEMUTimerListNotifyCB *notify_cb)
{ {
QEMUClockType type; QEMUClockType type;
for (type = 0; type < QEMU_CLOCK_MAX; type++) { for (type = 0; type < QEMU_CLOCK_MAX; type++) {