From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Subject: [PULL 6/9] timers: properly prefix init_clocks()
Date: Fri, 31 Oct 2025 22:15:15 +0100 [thread overview]
Message-ID: <20251031211518.38503-7-philmd@linaro.org> (raw)
In-Reply-To: <20251031211518.38503-1-philmd@linaro.org>
From: Alex Bennée <alex.bennee@linaro.org>
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 | 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.51.0
next prev parent reply other threads:[~2025-10-31 21:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-31 21:15 [PULL 0/9] Accelerators & CPU patches for Halloween 2025 Philippe Mathieu-Daudé
2025-10-31 21:15 ` [PULL 1/9] cpus: Access CPUState::thread_kicked atomically Philippe Mathieu-Daudé
2025-10-31 21:15 ` [PULL 2/9] accel/hvf: Make async_safe_run_on_cpu() safe Philippe Mathieu-Daudé
2025-10-31 21:15 ` [PULL 3/9] accel/tcg: Use cpu_is_stopped() helper to access CPUState::stopped Philippe Mathieu-Daudé
2025-10-31 21:15 ` [PULL 4/9] bql: Fix bql_locked status with condvar APIs Philippe Mathieu-Daudé
2025-10-31 21:15 ` [PULL 5/9] exec/cpu: Declare cpu_memory_rw_debug() in 'hw/core/cpu.h' and document Philippe Mathieu-Daudé
2025-10-31 21:15 ` Philippe Mathieu-Daudé [this message]
2025-10-31 21:15 ` [PULL 7/9] util/hexdump: fix QEMU_HEXDUMP_LINE_WIDTH logic Philippe Mathieu-Daudé
2025-10-31 21:15 ` [PULL 8/9] tests/unit: add unit test for qemu_hexdump() Philippe Mathieu-Daudé
2025-10-31 21:15 ` [PULL 9/9] rx: cpu: fix interrupts check in rx_cpu_do_interrupt() Philippe Mathieu-Daudé
2025-11-01 11:13 ` [PULL 0/9] Accelerators & CPU patches for Halloween 2025 Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251031211518.38503-7-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).