|
|
@ -21,33 +21,34 @@ index d852d5d6ad10..be38e1811af2 100644 |
|
|
|
+#define SCHED_DEADLINE 6 |
|
|
|
+#define SCHED_DEADLINE 6 |
|
|
|
+#endif |
|
|
|
+#endif |
|
|
|
+ |
|
|
|
+ |
|
|
|
|
|
|
|
|
|
|
|
static PyObject *schedstr(PyObject *self __unused, PyObject *args) |
|
|
|
static PyObject *schedstr(PyObject *self __unused, PyObject *args) |
|
|
|
{ |
|
|
|
{ |
|
|
|
@@ -258,6 +262,7 @@ static PyObject *schedstr(PyObject *self __unused, PyObject *args) |
|
|
|
@@ -258,6 +262,7 @@ static PyObject *schedstr(PyObject *self __unused, PyObject *args) |
|
|
|
case SCHED_FIFO: s = "SCHED_FIFO"; break; |
|
|
|
case SCHED_FIFO: s = "SCHED_FIFO"; break; |
|
|
|
case SCHED_BATCH: s = "SCHED_BATCH"; break; |
|
|
|
case SCHED_BATCH: s = "SCHED_BATCH"; break; |
|
|
|
case SCHED_IDLE: s = "SCHED_IDLE"; break; |
|
|
|
case SCHED_IDLE: s = "SCHED_IDLE"; break; |
|
|
|
+ case SCHED_DEADLINE: s = "SCHED_DEADLINE"; break; |
|
|
|
+ case SCHED_DEADLINE: s = "SCHED_DEADLINE"; break; |
|
|
|
default: s = "UNKNOWN"; break; |
|
|
|
default: s = "UNKNOWN"; break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@@ -282,6 +287,8 @@ static PyObject *schedfromstr(PyObject *self __unused, PyObject *args) |
|
|
|
@@ -282,6 +287,8 @@ static PyObject *schedfromstr(PyObject *self __unused, PyObject *args) |
|
|
|
scheduler = SCHED_BATCH; |
|
|
|
scheduler = SCHED_BATCH; |
|
|
|
else if (strcmp(s, "SCHED_IDLE") == 0) |
|
|
|
else if (strcmp(s, "SCHED_IDLE") == 0) |
|
|
|
scheduler = SCHED_IDLE; |
|
|
|
scheduler = SCHED_IDLE; |
|
|
|
+ else if (strcmp(s, "SCHED_DEADLINE") == 0) |
|
|
|
+ else if (strcmp(s, "SCHED_DEADLINE") == 0) |
|
|
|
+ scheduler = SCHED_DEADLINE; |
|
|
|
+ scheduler = SCHED_DEADLINE; |
|
|
|
else { |
|
|
|
else { |
|
|
|
PyErr_SetString(PyExc_OSError, "Unknown scheduler"); |
|
|
|
PyErr_SetString(PyExc_OSError, "Unknown scheduler"); |
|
|
|
return NULL; |
|
|
|
return NULL; |
|
|
|
@@ -382,6 +389,7 @@ PyMODINIT_FUNC initschedutils(void) |
|
|
|
@@ -382,6 +389,7 @@ PyMODINIT_FUNC initschedutils(void) |
|
|
|
PyModule_AddIntConstant(m, "SCHED_RR", SCHED_RR); |
|
|
|
PyModule_AddIntConstant(m, "SCHED_RR", SCHED_RR); |
|
|
|
PyModule_AddIntConstant(m, "SCHED_BATCH", SCHED_BATCH); |
|
|
|
PyModule_AddIntConstant(m, "SCHED_BATCH", SCHED_BATCH); |
|
|
|
PyModule_AddIntConstant(m, "SCHED_IDLE", SCHED_IDLE); |
|
|
|
PyModule_AddIntConstant(m, "SCHED_IDLE", SCHED_IDLE); |
|
|
|
+ PyModule_AddIntConstant(m, "SCHED_DEADLINE", SCHED_DEADLINE); |
|
|
|
+ PyModule_AddIntConstant(m, "SCHED_DEADLINE", SCHED_DEADLINE); |
|
|
|
PyModule_AddIntConstant(m, "SCHED_RESET_ON_FORK", SCHED_RESET_ON_FORK); |
|
|
|
PyModule_AddIntConstant(m, "SCHED_RESET_ON_FORK", SCHED_RESET_ON_FORK); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
-- |
|
|
|
-- |
|
|
|
2.4.11 |
|
|
|
2.4.11 |
|
|
|
|
|
|
|
|
|
|
|