[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxl: timeouts: Break out time_occurs
commit 54f3f3850a8a34823d30591d13e658bbaa50232b Author: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> AuthorDate: Fri Jan 31 15:04:37 2014 +0000 Commit: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> CommitDate: Thu Feb 6 14:21:41 2014 +0000 libxl: timeouts: Break out time_occurs Bring together the two places where etime->func() is called into a new function time_occurs. For one call site this is pure code motion. For the other the only semantic change is the introduction of a new debugging message. Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Cc: Jim Fehlig <jfehlig@xxxxxxxx> Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxx> Acked-by: Ian Campbell <Ian.Campbell@xxxxxxxxxx> --- tools/libxl/libxl_event.c | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event.c index 93f8fdc..5a99932 100644 --- a/tools/libxl/libxl_event.c +++ b/tools/libxl/libxl_event.c @@ -381,6 +381,15 @@ void libxl__ev_time_deregister(libxl__gc *gc, libxl__ev_time *ev) return; } +static void time_occurs(libxl__egc *egc, libxl__ev_time *etime) +{ + DBG("ev_time=%p occurs abs=%lu.%06lu", + etime, (unsigned long)etime->abs.tv_sec, + (unsigned long)etime->abs.tv_usec); + + etime->func(egc, etime, &etime->abs); +} + /* * xenstore watches @@ -1007,11 +1016,7 @@ static void afterpoll_internal(libxl__egc *egc, libxl__poller *poller, time_deregister(gc, etime); - DBG("ev_time=%p occurs abs=%lu.%06lu", - etime, (unsigned long)etime->abs.tv_sec, - (unsigned long)etime->abs.tv_usec); - - etime->func(egc, etime, &etime->abs); + time_occurs(egc, etime); } } @@ -1092,7 +1097,8 @@ void libxl_osevent_occurred_timeout(libxl_ctx *ctx, void *for_libxl) assert(!ev->infinite); LIBXL_TAILQ_REMOVE(&CTX->etimes, ev, entry); - ev->func(egc, ev, &ev->abs); + + time_occurs(egc, ev); out: CTX_UNLOCK; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |