* [RFC PATCH] timers: properly prefix init_clocks()
@ 2025-10-30 17:33 Alex Bennée
2025-10-30 22:13 ` Philippe Mathieu-Daudé
2025-10-31 21:11 ` Philippe Mathieu-Daudé
0 siblings, 2 replies; 3+ messages in thread
From: Alex Bennée @ 2025-10-30 17:33 UTC (permalink / raw)
To: qemu-devel; +Cc: Alex Bennée, Paolo Bonzini
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>
---
include/qemu/timer.h | 5 +++--
tests/unit/test-aio-multithread.c | 2 +-
util/main-loop.c | 2 +-
util/qemu-timer.c | 2 +-
4 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/include/qemu/timer.h b/include/qemu/timer.h
index 406d7411203..8b561cd6960 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 0ead6bf34ad..c24200a7121 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 b8ddda8f5ee..b462598f76e 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 56f11b6a641..2a6be4c7f95 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++) {
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RFC PATCH] timers: properly prefix init_clocks()
2025-10-30 17:33 [RFC PATCH] timers: properly prefix init_clocks() Alex Bennée
@ 2025-10-30 22:13 ` Philippe Mathieu-Daudé
2025-10-31 21:11 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-10-30 22:13 UTC (permalink / raw)
To: Alex Bennée, qemu-devel; +Cc: Paolo Bonzini
On 30/10/25 18:33, Alex Bennée wrote:
> 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>
> ---
> include/qemu/timer.h | 5 +++--
> tests/unit/test-aio-multithread.c | 2 +-
> util/main-loop.c | 2 +-
> util/qemu-timer.c | 2 +-
> 4 files changed, 6 insertions(+), 5 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC PATCH] timers: properly prefix init_clocks()
2025-10-30 17:33 [RFC PATCH] timers: properly prefix init_clocks() Alex Bennée
2025-10-30 22:13 ` Philippe Mathieu-Daudé
@ 2025-10-31 21:11 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-10-31 21:11 UTC (permalink / raw)
To: Alex Bennée, qemu-devel; +Cc: Paolo Bonzini
On 30/10/25 18:33, Alex Bennée wrote:
> 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>
> ---
> include/qemu/timer.h | 5 +++--
> tests/unit/test-aio-multithread.c | 2 +-
> util/main-loop.c | 2 +-
> util/qemu-timer.c | 2 +-
> 4 files changed, 6 insertions(+), 5 deletions(-)
Queued, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-31 21:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-30 17:33 [RFC PATCH] timers: properly prefix init_clocks() Alex Bennée
2025-10-30 22:13 ` Philippe Mathieu-Daudé
2025-10-31 21:11 ` Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).