summaryrefslogtreecommitdiff
path: root/qemu-timer.c
diff options
context:
space:
mode:
authorAlex Bligh <alex@alex.org.uk>2013-08-21 16:03:09 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-08-22 19:14:24 +0200
commitb4049b74b97f30fe944c63b5f158ec9e87bd2593 (patch)
treebc79b7a0f8b307cff0a900d18aacc928a0f7e99b /qemu-timer.c
parentbc72ad67543f5c5d39c005ff0ca72da37642a1fb (diff)
aio / timers: Remove legacy interface
Remove the legacy interface from include/qemu/timers.h. Ensure struct QEMUClock is not exposed at all. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'qemu-timer.c')
-rw-r--r--qemu-timer.c35
1 files changed, 3 insertions, 32 deletions
diff --git a/qemu-timer.c b/qemu-timer.c
index ed1763f501..95ff47fef3 100644
--- a/qemu-timer.c
+++ b/qemu-timer.c
@@ -44,7 +44,7 @@
/***********************************************************/
/* timers */
-struct QEMUClock {
+typedef struct QEMUClock {
QLIST_HEAD(, QEMUTimerList) timerlists;
NotifierList reset_notifiers;
@@ -52,7 +52,7 @@ struct QEMUClock {
QEMUClockType type;
bool enabled;
-};
+} QEMUClock;
QEMUTimerListGroup main_loop_tlg;
QEMUClock qemu_clocks[QEMU_CLOCK_MAX];
@@ -80,7 +80,7 @@ struct QEMUTimerList {
*
* Returns: a pointer to the QEMUClock object
*/
-QEMUClock *qemu_clock_ptr(QEMUClockType type)
+static inline QEMUClock *qemu_clock_ptr(QEMUClockType type)
{
return &qemu_clocks[type];
}
@@ -291,13 +291,6 @@ void timer_init(QEMUTimer *ts,
ts->scale = scale;
}
-QEMUTimer *qemu_new_timer(QEMUClock *clock, int scale,
- QEMUTimerCB *cb, void *opaque)
-{
- return timer_new_tl(main_loop_tlg.tl[clock->type],
- scale, cb, opaque);
-}
-
void timer_free(QEMUTimer *ts)
{
g_free(ts);
@@ -407,11 +400,6 @@ bool qemu_clock_run_timers(QEMUClockType type)
return timerlist_run_timers(main_loop_tlg.tl[type]);
}
-bool qemu_run_timers(QEMUClock *clock)
-{
- return qemu_clock_run_timers(clock->type);
-}
-
void timerlistgroup_init(QEMUTimerListGroup *tlg,
QEMUTimerListNotifyCB *cb, void *opaque)
{
@@ -479,11 +467,6 @@ int64_t qemu_clock_get_ns(QEMUClockType type)
}
}
-int64_t qemu_get_clock_ns(QEMUClock *clock)
-{
- return qemu_clock_get_ns(clock->type);
-}
-
void qemu_clock_register_reset_notifier(QEMUClockType type,
Notifier *notifier)
{
@@ -497,18 +480,6 @@ void qemu_clock_unregister_reset_notifier(QEMUClockType type,
notifier_remove(notifier);
}
-void qemu_register_clock_reset_notifier(QEMUClock *clock,
- Notifier *notifier)
-{
- qemu_clock_register_reset_notifier(clock->type, notifier);
-}
-
-void qemu_unregister_clock_reset_notifier(QEMUClock *clock,
- Notifier *notifier)
-{
- qemu_clock_unregister_reset_notifier(clock->type, notifier);
-}
-
void init_clocks(void)
{
QEMUClockType type;