diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2008-08-27 09:51:31 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2008-08-27 09:51:31 -0300 |
commit | bc1388c8633076c80e4ccec6892ef8706889d968 (patch) | |
tree | b153c662c64f551358da3f9b89a14fce5094d0fa | |
parent | 68a9753a7606c18db695187fb7ddd310dab383bf (diff) | |
download | python-schedutils-bc1388c8633076c80e4ccec6892ef8706889d968.tar.gz |
schedutils: Add constants for SCHED_{BATCH,FIFO,OTHER,RR}
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | python-schedutils/schedutils.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/python-schedutils/schedutils.c b/python-schedutils/schedutils.c index fe02782..85b465d 100644 --- a/python-schedutils/schedutils.c +++ b/python-schedutils/schedutils.c @@ -197,6 +197,13 @@ static struct PyMethodDef PySchedutilsModuleMethods[] = { PyMODINIT_FUNC initschedutils(void) { - Py_InitModule("schedutils", PySchedutilsModuleMethods); + PyObject *m = Py_InitModule("schedutils", PySchedutilsModuleMethods); + if (m == NULL) + return; + + PyModule_AddIntConstant(m, "SCHED_OTHER", SCHED_OTHER); + PyModule_AddIntConstant(m, "SCHED_FIFO", SCHED_FIFO); + PyModule_AddIntConstant(m, "SCHED_RR", SCHED_RR); + PyModule_AddIntConstant(m, "SCHED_BATCH", SCHED_BATCH); } |