static int suspend(void) { if (si.suspend_evtchn >= 0) return evtchn_suspend(); return compat_suspend(); }
/* suspend the domain. Returns 0 on failure, 1 on success */ int checkpoint_suspend(checkpoint_state* s) { struct timeval tv; int rc; gettimeofday(&tv, NULL); fprintf(stderr, "PROF: suspending at %lu.%06lu\n", (unsigned long)tv.tv_sec, (unsigned long)tv.tv_usec); if (s->suspend_evtchn >= 0) rc = evtchn_suspend(s); else if (s->domtype == dt_hvm) rc = suspend_hvm(s); else rc = compat_suspend(s); return rc < 0 ? 0 : 1; }