Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
12 changes: 12 additions & 0 deletions Doc/library/os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5420,10 +5420,22 @@ operating system.
Scheduling policy for CPU-intensive processes that tries to preserve
interactivity on the rest of the computer.

.. data:: SCHED_DEADLINE

Scheduling strategies for tasks with real-time constraints.
Comment thread
rruuaanng marked this conversation as resolved.
Outdated

.. versionadded:: next

.. data:: SCHED_IDLE

Scheduling policy for extremely low priority background tasks.

.. data:: SCHED_NORMAL

Alias for :data:`SCHED_OTHER`.

.. versionadded:: next

.. data:: SCHED_SPORADIC

Scheduling policy for sporadic server programs.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add the ``SCHED_DEADLINE`` and ``SCHED_NORMAL`` constants to the :mod:`os` module.
Comment thread
rruuaanng marked this conversation as resolved.
Outdated
6 changes: 6 additions & 0 deletions Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -17500,9 +17500,15 @@ all_ins(PyObject *m)
#ifdef SCHED_OTHER
if (PyModule_AddIntMacro(m, SCHED_OTHER)) return -1;
#endif
#ifdef SCHED_DEADLINE
if (PyModule_AddIntMacro(m, SCHED_DEADLINE)) return -1;
#endif
#ifdef SCHED_FIFO
if (PyModule_AddIntMacro(m, SCHED_FIFO)) return -1;
#endif
#ifdef SCHED_NORMAL
if (PyModule_AddIntMacro(m, SCHED_NORMAL)) return -1;
#endif
#ifdef SCHED_RR
if (PyModule_AddIntMacro(m, SCHED_RR)) return -1;
#endif
Expand Down