[XEN] New event-channel reset operation.

Plumbed through libxenctrl to python.

From: Andrei Petrov <andrei.petrov@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
kfraser@localhost.localdomain committed 2007-01-19 17:20:57 +00:00
1 parent f272b20670
commit 115209d91b
5 files changed
+79 -1

No files matched your search

+24
View File
@@ -478,6 +478,24 @@ static PyObject *pyxc_evtchn_alloc_unbound(XcObject *self,
return PyInt_FromLong(port);
}
static PyObject *pyxc_evtchn_reset(XcObject *self,
PyObject *args,
PyObject *kwds)
{
uint32_t dom;
static char *kwd_list[] = { "dom", NULL };
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "i", kwd_list, &dom) )
return NULL;
if ( xc_evtchn_reset(self->xc_handle, dom) < 0 )
return pyxc_error_to_exception();
Py_INCREF(zero);
return zero;
}
static PyObject *pyxc_physdev_pci_access_modify(XcObject *self,
PyObject *args,
PyObject *kwds)
@@ -1202,6 +1220,12 @@ static PyMethodDef pyxc_methods[] = {
" remote_dom [int]: Remote domain to accept connections from.\n\n"
"Returns: [int] Unbound event-channel port.\n" },
{ "evtchn_reset",
(PyCFunction)pyxc_evtchn_reset,
METH_VARARGS | METH_KEYWORDS, "\n"
"Reset all connections.\n"
" dom [int]: Domain to reset.\n" },
{ "physdev_pci_access_modify",
(PyCFunction)pyxc_physdev_pci_access_modify,
METH_VARARGS | METH_KEYWORDS, "\n"
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.