X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=python%2Fvserverimpl.c;h=eef6f8ef64d624822c9c7fd3a3b208ebc1732483;hb=c4ab647140e6387139cb7fd54c43e96fc6981a5c;hp=b20725c3891326c695349e78cfd19999e3cca108;hpb=66033b3d11dfc7db217940ead889491f71c84813;p=util-vserver-pl.git diff --git a/python/vserverimpl.c b/python/vserverimpl.c index b20725c..eef6f8e 100644 --- a/python/vserverimpl.c +++ b/python/vserverimpl.c @@ -192,14 +192,14 @@ static PyObject * vserver_setsched(PyObject *self, PyObject *args) { xid_t ctx; + uint32_t cpu_min; uint32_t cpu_share; - uint32_t cpu_sched_flags = VC_VXF_SCHED_FLAGS; - if (!PyArg_ParseTuple(args, "II|I", &ctx, &cpu_share, &cpu_sched_flags)) + if (!PyArg_ParseTuple(args, "II|I", &ctx, &cpu_min, &cpu_share)) return NULL; /* ESRCH indicates that there are no processes in the context */ - if (pl_setsched(ctx, cpu_share, cpu_sched_flags) && + if (pl_setsched(ctx, cpu_min, cpu_share) && errno != ESRCH) return PyErr_SetFromErrno(PyExc_OSError); @@ -740,8 +740,4 @@ initvserverimpl(void) PyModule_AddIntConstant(mod, "VLIMIT_ANON", (int)VC_VLIMIT_ANON); PyModule_AddIntConstant(mod, "VLIMIT_SHMEM", (int)VC_VLIMIT_SHMEM); - /* scheduler flags */ - PyModule_AddIntConstant(mod, - "VS_SCHED_CPU_GUARANTEED", - VS_SCHED_CPU_GUARANTEED); }