From b4049b74b97f30fe944c63b5f158ec9e87bd2593 Mon Sep 17 00:00:00 2001 From: Alex Bligh Date: Wed, 21 Aug 2013 16:03:09 +0100 Subject: 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 Signed-off-by: Stefan Hajnoczi --- qemu-timer.c | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) (limited to 'qemu-timer.c') 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; -- cgit v1.2.3