more cleanup
This commit is contained in:
@@ -106,147 +106,6 @@ static inline int64_t qemu_clock_get_us(QEMUClockType type)
|
||||
return qemu_clock_get_ns(type) / SCALE_US;
|
||||
}
|
||||
|
||||
/**
|
||||
* qemu_clock_has_timers:
|
||||
* @type: the clock type
|
||||
*
|
||||
* Determines whether a clock's default timer list
|
||||
* has timers attached
|
||||
*
|
||||
* Note that this function should not be used when other threads also access
|
||||
* the timer list. The return value may be outdated by the time it is acted
|
||||
* upon.
|
||||
*
|
||||
* Returns: true if the clock's default timer list
|
||||
* has timers attached
|
||||
*/
|
||||
bool qemu_clock_has_timers(QEMUClockType type);
|
||||
|
||||
/**
|
||||
* qemu_clock_expired:
|
||||
* @type: the clock type
|
||||
*
|
||||
* Determines whether a clock's default timer list
|
||||
* has an expired clock.
|
||||
*
|
||||
* Returns: true if the clock's default timer list has
|
||||
* an expired timer
|
||||
*/
|
||||
bool qemu_clock_expired(QEMUClockType type);
|
||||
|
||||
/**
|
||||
* qemu_clock_use_for_deadline:
|
||||
* @type: the clock type
|
||||
*
|
||||
* Determine whether a clock should be used for deadline
|
||||
* calculations. Some clocks, for instance vm_clock with
|
||||
* use_icount set, do not count in nanoseconds. Such clocks
|
||||
* are not used for deadline calculations, and are presumed
|
||||
* to interrupt any poll using qemu_notify/aio_notify
|
||||
* etc.
|
||||
*
|
||||
* Returns: true if the clock runs in nanoseconds and
|
||||
* should be used for a deadline.
|
||||
*/
|
||||
bool qemu_clock_use_for_deadline(QEMUClockType type);
|
||||
|
||||
/**
|
||||
* qemu_clock_deadline_ns_all:
|
||||
* @type: the clock type
|
||||
*
|
||||
* Calculate the deadline across all timer lists associated
|
||||
* with a clock (as opposed to just the default one)
|
||||
* in nanoseconds, or -1 if no timer is set to expire.
|
||||
*
|
||||
* Returns: time until expiry in nanoseconds or -1
|
||||
*/
|
||||
int64_t qemu_clock_deadline_ns_all(QEMUClockType type);
|
||||
|
||||
/**
|
||||
* qemu_clock_get_main_loop_timerlist:
|
||||
* @type: the clock type
|
||||
*
|
||||
* Return the default timer list assocatiated with a clock.
|
||||
*
|
||||
* Returns: the default timer list
|
||||
*/
|
||||
QEMUTimerList *qemu_clock_get_main_loop_timerlist(QEMUClockType type);
|
||||
|
||||
/**
|
||||
* qemu_clock_nofify:
|
||||
* @type: the clock type
|
||||
*
|
||||
* Call the notifier callback connected with the default timer
|
||||
* list linked to the clock, or qemu_notify() if none.
|
||||
*/
|
||||
void qemu_clock_notify(QEMUClockType type);
|
||||
|
||||
/**
|
||||
* qemu_clock_enable:
|
||||
* @type: the clock type
|
||||
* @enabled: true to enable, false to disable
|
||||
*
|
||||
* Enable or disable a clock
|
||||
* Disabling the clock will wait for related timerlists to stop
|
||||
* executing qemu_run_timers. Thus, this functions should not
|
||||
* be used from the callback of a timer that is based on @clock.
|
||||
* Doing so would cause a deadlock.
|
||||
*
|
||||
* Caller should hold BQL.
|
||||
*/
|
||||
void qemu_clock_enable(QEMUClockType type, bool enabled);
|
||||
|
||||
/**
|
||||
* qemu_clock_warp:
|
||||
* @type: the clock type
|
||||
*
|
||||
* Warp a clock to a new value
|
||||
*/
|
||||
void qemu_clock_warp(QEMUClockType type);
|
||||
|
||||
/**
|
||||
* qemu_clock_register_reset_notifier:
|
||||
* @type: the clock type
|
||||
* @notifier: the notifier function
|
||||
*
|
||||
* Register a notifier function to call when the clock
|
||||
* concerned is reset.
|
||||
*/
|
||||
void qemu_clock_register_reset_notifier(QEMUClockType type,
|
||||
Notifier *notifier);
|
||||
|
||||
/**
|
||||
* qemu_clock_unregister_reset_notifier:
|
||||
* @type: the clock type
|
||||
* @notifier: the notifier function
|
||||
*
|
||||
* Unregister a notifier function to call when the clock
|
||||
* concerned is reset.
|
||||
*/
|
||||
void qemu_clock_unregister_reset_notifier(QEMUClockType type,
|
||||
Notifier *notifier);
|
||||
|
||||
/**
|
||||
* qemu_clock_run_timers:
|
||||
* @type: clock on which to operate
|
||||
*
|
||||
* Run all the timers associated with the default timer list
|
||||
* of a clock.
|
||||
*
|
||||
* Returns: true if any timer ran.
|
||||
*/
|
||||
bool qemu_clock_run_timers(QEMUClockType type);
|
||||
|
||||
/**
|
||||
* qemu_clock_run_all_timers:
|
||||
*
|
||||
* Run all the timers associated with the default timer list
|
||||
* of every clock.
|
||||
*
|
||||
* Returns: true if any timer ran.
|
||||
*/
|
||||
bool qemu_clock_run_all_timers(void);
|
||||
|
||||
/*
|
||||
* QEMUTimerList
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user