Revision 754d6a54 include/qemu/timer.h

b/include/qemu/timer.h
53 53

  
54 54
typedef struct QEMUClock QEMUClock;
55 55
typedef struct QEMUTimerList QEMUTimerList;
56

  
57
struct QEMUTimerListGroup {
58
    QEMUTimerList *tl[QEMU_CLOCK_MAX];
59
};
60

  
56 61
typedef void QEMUTimerCB(void *opaque);
57 62

  
58 63
struct QEMUTimer {
......
64 69
    int scale;
65 70
};
66 71

  
72
extern QEMUTimerListGroup main_loop_tlg;
67 73
extern QEMUClock *qemu_clocks[QEMU_CLOCK_MAX];
68 74

  
69 75
/**
......
218 224
bool timerlist_run_timers(QEMUTimerList *timer_list);
219 225

  
220 226
/**
227
 * timerlistgroup_init:
228
 * @tlg: the timer list group
229
 *
230
 * Initialise a timer list group. This must already be
231
 * allocated in memory and zeroed.
232
 */
233
void timerlistgroup_init(QEMUTimerListGroup *tlg);
234

  
235
/**
236
 * timerlistgroup_deinit:
237
 * @tlg: the timer list group
238
 *
239
 * Deinitialise a timer list group. This must already be
240
 * initialised. Note the memory is not freed.
241
 */
242
void timerlistgroup_deinit(QEMUTimerListGroup *tlg);
243

  
244
/**
245
 * timerlistgroup_run_timers:
246
 * @tlg: the timer list group
247
 *
248
 * Run the timers associated with a timer list group.
249
 * This will run timers on multiple clocks.
250
 *
251
 * Returns: true if any timer callback ran
252
 */
253
bool timerlistgroup_run_timers(QEMUTimerListGroup *tlg);
254

  
255
/**
256
 * timerlistgroup_deadline_ns
257
 * @tlg: the timer list group
258
 *
259
 * Determine the deadline of the soonest timer to
260
 * expire associated with any timer list linked to
261
 * the timer list group. Only clocks suitable for
262
 * deadline calculation are included.
263
 *
264
 * Returns: the deadline in nanoseconds or -1 if no
265
 * timers are to expire.
266
 */
267
int64_t timerlistgroup_deadline_ns(QEMUTimerListGroup *tlg);
268

  
269
/**
221 270
 * qemu_timeout_ns_to_ms:
222 271
 * @ns: nanosecond timeout value
223 272
 *

Also available in: Unified diff