[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [Minios-devel] [PATCH RFC 10/16] Save/Restore Support: Add suspend/resume support for timers
Bruno Alvisio, on mar. 19 déc. 2017 15:42:05 -0800, wrote: > Signed-off-by: Bruno Alvisio <bruno.alvisio@xxxxxxxxx> > +void resume_time(void) > +{ > + port = bind_virq(VIRQ_TIMER, &timer_handler, NULL); > + unmask_evtchn(port); > +} I'd say rather factorize it with init_time. (you could even just remove the printf there to avoid having to write yet another function) > diff --git a/include/time.h b/include/time.h > index 5d6ed67..2e06d58 100644 > --- a/include/time.h > +++ b/include/time.h > @@ -55,6 +55,8 @@ typedef long suseconds_t; > /* prototypes */ > void init_time(void); > void fini_time(void); > +void suspend_time(void); > +void resume_time(void); > s_time_t get_s_time(void); > s_time_t get_v_time(void); > uint64_t monotonic_clock(void); > diff --git a/kernel.c b/kernel.c > index 782eb79..a16b1ba 100644 > --- a/kernel.c > +++ b/kernel.c > @@ -120,10 +120,14 @@ void start_kernel(void* par) > void pre_suspend(void) > { > local_irq_disable(); > + > + suspend_time(); > } > > void post_suspend(int canceled) > { > + resume_time(); > + > local_irq_enable(); > } > > -- > 2.3.2 (Apple Git-55) > > > _______________________________________________ > Minios-devel mailing list > Minios-devel@xxxxxxxxxxxxxxxxxxxx > https://lists.xenproject.org/mailman/listinfo/minios-devel -- Samuel <y> ça gaze ? <l> prout -+- #ens-mim - ouvrez les fenêtres ! -+- _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |