tests/qtest/stm32l4x5_usart-test.c will include qemu/timer.h in a suceeding change, but it causes a conflict of init_clocks() definitions.
Since other functions that operate on clocks are prefixed with qemu_clock_, follow the convention by renaming init_clocks() to qemu_clock_init() and avoid the name conflict in the suceeding change. Signed-off-by: Akihiko Odaki <[email protected]> --- include/qemu/timer.h | 4 ++-- tests/unit/test-aio-multithread.c | 2 +- util/main-loop.c | 2 +- util/qemu-timer.c | 7 ++++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/qemu/timer.h b/include/qemu/timer.h index 406d74112030..9dfde0660d0e 100644 --- a/include/qemu/timer.h +++ b/include/qemu/timer.h @@ -786,11 +786,11 @@ static inline int64_t qemu_soonest_timeout(int64_t timeout1, int64_t timeout2) } /** - * initclocks: + * qemu_clock_init: * * Initialise the clock & timer infrastructure */ -void init_clocks(QEMUTimerListNotifyCB *notify_cb); +void qemu_clock_init(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 0ead6bf34ad1..33720b3ffff0 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_clock_init(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 b8ddda8f5eec..718b87e05c74 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_clock_init(qemu_timer_notify_cb); ret = qemu_signal_init(errp); if (ret) { diff --git a/util/qemu-timer.c b/util/qemu-timer.c index 56f11b6a641f..c96856d70123 100644 --- a/util/qemu-timer.c +++ b/util/qemu-timer.c @@ -121,7 +121,8 @@ void timerlist_free(QEMUTimerList *timer_list) g_free(timer_list); } -static void qemu_clock_init(QEMUClockType type, QEMUTimerListNotifyCB *notify_cb) +static void qemu_clock_init_one(QEMUClockType type, + QEMUTimerListNotifyCB *notify_cb) { QEMUClock *clock = qemu_clock_ptr(type); @@ -637,11 +638,11 @@ static void qemu_virtual_clock_set_ns(int64_t time) return cpus_set_virtual_clock(time); } -void init_clocks(QEMUTimerListNotifyCB *notify_cb) +void qemu_clock_init(QEMUTimerListNotifyCB *notify_cb) { QEMUClockType type; for (type = 0; type < QEMU_CLOCK_MAX; type++) { - qemu_clock_init(type, notify_cb); + qemu_clock_init_one(type, notify_cb); } #ifdef CONFIG_PRCTL_PR_SET_TIMERSLACK -- 2.52.0
