[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 05 of 10] Export XS_RESUME to xend
# HG changeset patch # User Brendan Cully <brendan@xxxxxxxxx> # Date 1166166342 28800 # Node ID 84b42490685d4cc9cf6aeea43bb4d90c31a20bc1 # Parent 9c35e3a499a7a3eb95eaab616ded1e77d4676722 Export XS_RESUME to xend. Signed-off-by: Brendan Cully <brendan@xxxxxxxxx> diff -r 9c35e3a499a7 -r 84b42490685d tools/python/xen/lowlevel/xs/xs.c --- a/tools/python/xen/lowlevel/xs/xs.c Thu Dec 14 23:05:42 2006 -0800 +++ b/tools/python/xen/lowlevel/xs/xs.c Thu Dec 14 23:05:42 2006 -0800 @@ -618,6 +618,33 @@ static PyObject *xspy_introduce_domain(X return none(result); } +#define xspy_resume_domain_doc "\n" \ + "Tell xenstore to clear its shutdown flag for a domain.\n" \ + "This ensures that a subsequent shutdown will fire the\n" \ + "appropriate watches.\n" \ + " dom [int]: domain id\n" \ + "\n" \ + "Returns None on success.\n" \ + "Raises xen.lowlevel.xs.Error on error.\n" + +static PyObject *xspy_resume_domain(XsHandle *self, PyObject *args) +{ + uint32_t dom; + + struct xs_handle *xh = xshandle(self); + bool result = 0; + + if (!xh) + return NULL; + if (!PyArg_ParseTuple(args, "i", &dom)) + return NULL; + + Py_BEGIN_ALLOW_THREADS + result = xs_resume_domain(xh, dom); + Py_END_ALLOW_THREADS + + return none(result); +} #define xspy_release_domain_doc "\n" \ "Tell xenstore to release its channel to a domain.\n" \ @@ -789,6 +816,7 @@ static PyMethodDef xshandle_methods[] = XSPY_METH(transaction_start, METH_NOARGS), XSPY_METH(transaction_end, METH_VARARGS | METH_KEYWORDS), XSPY_METH(introduce_domain, METH_VARARGS), + XSPY_METH(resume_domain, METH_VARARGS), XSPY_METH(release_domain, METH_VARARGS), XSPY_METH(close, METH_NOARGS), XSPY_METH(get_domain_path, METH_VARARGS), diff -r 9c35e3a499a7 -r 84b42490685d tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Thu Dec 14 23:05:42 2006 -0800 +++ b/tools/python/xen/xend/XendDomainInfo.py Thu Dec 14 23:05:42 2006 -0800 @@ -45,7 +45,7 @@ from xen.xend.XendError import XendError from xen.xend.XendError import XendError, VmError from xen.xend.XendDevices import XendDevices from xen.xend.xenstore.xstransact import xstransact, complete -from xen.xend.xenstore.xsutil import GetDomainPath, IntroduceDomain +from xen.xend.xenstore.xsutil import GetDomainPath, IntroduceDomain, ResumeDomain from xen.xend.xenstore.xswatch import xswatch from xen.xend.XendConstants import * from xen.xend.XendAPIConstants import * @@ -1532,6 +1532,7 @@ class XendDomainInfo: try: if self.domid is not None: xc.domain_resume(self.domid) + ResumeDomain(self.domid) except: log.exception("XendDomainInfo.resume: xc.domain_resume failed on domain %s." % (str(self.domid))) diff -r 9c35e3a499a7 -r 84b42490685d tools/python/xen/xend/xenstore/xsutil.py --- a/tools/python/xen/xend/xenstore/xsutil.py Thu Dec 14 23:05:42 2006 -0800 +++ b/tools/python/xen/xend/xenstore/xsutil.py Thu Dec 14 23:05:42 2006 -0800 @@ -24,3 +24,6 @@ def IntroduceDomain(domid, page, port): def GetDomainPath(domid): return xshandle().get_domain_path(domid) + +def ResumeDomain(domid): + return xshandle().resume_domain(domid) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |