diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-02-10 17:03:09 -0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-02-10 17:03:09 -0200 |
commit | 66a2327a3cf5bb09061c0ab5b862619dc65bb0f5 (patch) | |
tree | 818ea2b294b25d3a13e70973013a507bd9d92794 | |
parent | 4e05f75442171fb298e252be19f3af9da58dc6d2 (diff) | |
download | python-schedutils-66a2327a3cf5bb09061c0ab5b862619dc65bb0f5.tar.gz |
Add SCHED_IDLE to the list of constants exported
And use it in pchrt.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rwxr-xr-x | pchrt.py | 3 | ||||
-rw-r--r-- | python-schedutils/schedutils.c | 1 |
2 files changed, 4 insertions, 0 deletions
@@ -22,6 +22,7 @@ usage: chrt [options] [prio] [pid | cmd [args...]] manipulate real-time attributes of a process -b, --batch set policy to SCHED_BATCH -f, --fifo set policy to SCHED_FIFO + -i, --idle set policy to SCHED_IDLE -p, --pid operate on existing given pid -m, --max show min and max valid priorities -o, --other set policy to SCHED_OTHER @@ -80,6 +81,8 @@ def main(): policy = schedutils.SCHED_BATCH elif o in ("-f", "--fifo"): policy = schedutils.SCHED_FIFO + elif o in ("-i", "--idle"): + policy = schedutils.SCHED_IDLE elif o in ("-m", "--max"): show_all_priority_limits() return diff --git a/python-schedutils/schedutils.c b/python-schedutils/schedutils.c index fc9192a..670dcff 100644 --- a/python-schedutils/schedutils.c +++ b/python-schedutils/schedutils.c @@ -255,5 +255,6 @@ PyMODINIT_FUNC initschedutils(void) PyModule_AddIntConstant(m, "SCHED_FIFO", SCHED_FIFO); PyModule_AddIntConstant(m, "SCHED_RR", SCHED_RR); PyModule_AddIntConstant(m, "SCHED_BATCH", SCHED_BATCH); + PyModule_AddIntConstant(m, "SCHED_IDLE", SCHED_IDLE); } |