aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Bligh <alex@alex.org.uk>2013-08-21 16:03:08 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-08-22 19:14:24 +0200
commit2d419d6587c516adc7e9de3e562a79ba51742661 (patch)
tree3a2e62aea3d9d157b4ea7380056c13919bf4eadb
parentd4659bc4a36575a075671e00f2ac07bfbdc29fb2 (diff)
downloadslirp-2d419d6587c516adc7e9de3e562a79ba51742661.zip
slirp-2d419d6587c516adc7e9de3e562a79ba51742661.tar.gz
slirp-2d419d6587c516adc7e9de3e562a79ba51742661.tar.bz2
aio / timers: Switch entire codebase to the new timer API
This is an autogenerated patch using scripts/switch-timer-api. Switch the entire code base to using the new timer API. Note this patch may introduce some line length issues. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r--if.c2
-rw-r--r--slirp.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/if.c b/if.c
index a5655ea..e18777f 100644
--- a/if.c
+++ b/if.c
@@ -150,7 +150,7 @@ diddit:
*/
void if_start(Slirp *slirp)
{
- uint64_t now = qemu_get_clock_ns(rt_clock);
+ uint64_t now = qemu_clock_get_ns(QEMU_CLOCK_REALTIME);
bool from_batchq, next_from_batchq;
struct mbuf *ifm, *ifm_next, *ifqt;
diff --git a/slirp.c b/slirp.c
index e6a26c4..636cf91 100644
--- a/slirp.c
+++ b/slirp.c
@@ -446,7 +446,7 @@ void slirp_pollfds_poll(GArray *pollfds, int select_error)
return;
}
- curtime = qemu_get_clock_ms(rt_clock);
+ curtime = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);
QTAILQ_FOREACH (slirp, &slirp_instances, entry) {
/*
@@ -781,7 +781,8 @@ int if_encap(Slirp *slirp, struct mbuf *ifm)
ifm->arp_requested = true;
/* Expire request and drop outgoing packet after 1 second */
- ifm->expiration_date = qemu_get_clock_ns(rt_clock) + 1000000000ULL;
+ ifm->expiration_date =
+ qemu_clock_get_ns(QEMU_CLOCK_REALTIME) + 1000000000ULL;
}
return 0;
} else {