diff options
author | Stefan Weil <sw@weilnetz.de> | 2012-04-20 11:51:58 +0200 |
---|---|---|
committer | Stefan Weil <sw@weilnetz.de> | 2012-04-27 07:39:39 +0200 |
commit | 9a14b298bb9651488fb9ef3f619233e3fabb7621 (patch) | |
tree | c63c6ea3c3d13520ac753988d27157be798b26e6 | |
parent | 8205199d7b4e7d1a9e57a83f2a5774187f2a2495 (diff) | |
download | qemu-9a14b298bb9651488fb9ef3f619233e3fabb7621.tar.gz qemu-9a14b298bb9651488fb9ef3f619233e3fabb7621.tar.bz2 qemu-9a14b298bb9651488fb9ef3f619233e3fabb7621.zip |
qemu-timer: Optimize data structures
Remove all holes which were found by pahole on Linux x86_64
(and replace "struct QEMUTimer" by "QEMUTimer").
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
-rw-r--r-- | qemu-timer.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/qemu-timer.c b/qemu-timer.c index 1f7952d350..8eadd16aa2 100644 --- a/qemu-timer.c +++ b/qemu-timer.c @@ -47,22 +47,22 @@ #define QEMU_CLOCK_HOST 2 struct QEMUClock { - int type; - bool enabled; - QEMUTimer *active_timers; NotifierList reset_notifiers; int64_t last; + + int type; + bool enabled; }; struct QEMUTimer { - QEMUClock *clock; int64_t expire_time; /* in nanoseconds */ - int scale; + QEMUClock *clock; QEMUTimerCB *cb; void *opaque; - struct QEMUTimer *next; + QEMUTimer *next; + int scale; }; struct qemu_alarm_timer { @@ -71,8 +71,8 @@ struct qemu_alarm_timer { void (*stop)(struct qemu_alarm_timer *t); void (*rearm)(struct qemu_alarm_timer *t, int64_t nearest_delta_ns); #if defined(__linux__) - int fd; timer_t timer; + int fd; #elif defined(_WIN32) HANDLE timer; #endif |