Skip to content

Commit

Permalink
aio / timers: Rename qemu_new_clock and expose clock types
Browse files Browse the repository at this point in the history
Rename qemu_new_clock to qemu_clock_new.

Expose clock types.

Signed-off-by: Alex Bligh <alex@alex.org.uk>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  • Loading branch information
abligh authored and stefanhaRH committed Aug 22, 2013
1 parent e93379b commit 58ac56b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 4 additions & 0 deletions include/qemu/timer.h
Expand Up @@ -11,6 +11,10 @@
#define SCALE_US 1000
#define SCALE_NS 1

#define QEMU_CLOCK_REALTIME 0
#define QEMU_CLOCK_VIRTUAL 1
#define QEMU_CLOCK_HOST 2

typedef struct QEMUClock QEMUClock;
typedef void QEMUTimerCB(void *opaque);

Expand Down
12 changes: 4 additions & 8 deletions qemu-timer.c
Expand Up @@ -40,10 +40,6 @@
/***********************************************************/
/* timers */

#define QEMU_CLOCK_REALTIME 0
#define QEMU_CLOCK_VIRTUAL 1
#define QEMU_CLOCK_HOST 2

struct QEMUClock {
QEMUTimer *active_timers;

Expand Down Expand Up @@ -231,7 +227,7 @@ QEMUClock *rt_clock;
QEMUClock *vm_clock;
QEMUClock *host_clock;

static QEMUClock *qemu_new_clock(int type)
static QEMUClock *qemu_clock_new(int type)
{
QEMUClock *clock;

Expand Down Expand Up @@ -433,9 +429,9 @@ void qemu_unregister_clock_reset_notifier(QEMUClock *clock, Notifier *notifier)
void init_clocks(void)
{
if (!rt_clock) {
rt_clock = qemu_new_clock(QEMU_CLOCK_REALTIME);
vm_clock = qemu_new_clock(QEMU_CLOCK_VIRTUAL);
host_clock = qemu_new_clock(QEMU_CLOCK_HOST);
rt_clock = qemu_clock_new(QEMU_CLOCK_REALTIME);
vm_clock = qemu_clock_new(QEMU_CLOCK_VIRTUAL);
host_clock = qemu_clock_new(QEMU_CLOCK_HOST);
}
}

Expand Down

0 comments on commit 58ac56b

Please sign in to comment.