ia64/xen-unstable

changeset 5908:ae3a721bbcb8

Add xc_init_store python binding.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Wed Jul 27 17:06:02 2005 +0000 (2005-07-27)
parents cda48f530e93
children de1207b85ef8
files tools/python/xen/lowlevel/xc/xc.c
line diff
     1.1 --- a/tools/python/xen/lowlevel/xc/xc.c	Wed Jul 27 17:04:47 2005 +0000
     1.2 +++ b/tools/python/xen/lowlevel/xc/xc.c	Wed Jul 27 17:06:02 2005 +0000
     1.3 @@ -813,6 +813,22 @@ static PyObject *pyxc_domain_memory_incr
     1.4      return zero;
     1.5  }
     1.6  
     1.7 +static PyObject *pyxc_init_store(PyObject *self, PyObject *args,
     1.8 +				 PyObject *kwds)
     1.9 +{
    1.10 +    XcObject *xc = (XcObject *)self;
    1.11 +
    1.12 +    int remote_port;
    1.13 +
    1.14 +    static char *kwd_list[] = { "remote_port", NULL };
    1.15 +
    1.16 +    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "i", kwd_list, 
    1.17 +                                      &remote_port) )
    1.18 +        return NULL;
    1.19 +
    1.20 +    return PyInt_FromLong(xc_init_store(xc->xc_handle, remote_port));
    1.21 +}
    1.22 +
    1.23  
    1.24  static PyMethodDef pyxc_methods[] = {
    1.25      { "handle",
    1.26 @@ -1088,6 +1104,13 @@ static PyMethodDef pyxc_methods[] = {
    1.27        " mem_kb [long]: .\n"
    1.28        "Returns: [int] 0 on success; -1 on error.\n" },
    1.29  
    1.30 +    { "init_store", 
    1.31 +      (PyCFunction)pyxc_init_store, 
    1.32 +      METH_VARARGS | METH_KEYWORDS, "\n"
    1.33 +      "Initialize the store event channel and return the store page mfn.\n"
    1.34 +      " remote_port [int]: store event channel port number.\n"
    1.35 +      "Returns: [int] mfn on success; <0 on error.\n" },
    1.36 +
    1.37      { NULL, NULL, 0, NULL }
    1.38  };
    1.39