Scheduling policy for CPU-intensive processes that tries to preserve
interactivity on the rest of the computer.
+.. data:: SCHED_DEADLINE
+
+ Scheduling policy for tasks with deadline constraints.
+
+ .. 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.
same process.
(Contributed by Victor Stinner in :gh:`120057`.)
+* Add the :data:`~os.SCHED_DEADLINE` and :data:`~os.SCHED_NORMAL` constants
+ to the :mod:`os` module.
+ (Contributed by James Roy in :gh:`127688`.)
+
pathlib
-------
--- /dev/null
+Add the :data:`~os.SCHED_DEADLINE` and :data:`~os.SCHED_NORMAL` constants
+to the :mod:`os` module.
# include <sched.h>
#endif
+#ifdef HAVE_LINUX_SCHED_H
+# include <linux/sched.h>
+#endif
+
#if !defined(CPU_ALLOC) && defined(HAVE_SCHED_SETAFFINITY)
# undef HAVE_SCHED_SETAFFINITY
#endif
#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
then :
printf "%s\n" "#define HAVE_LINUX_SOUNDCARD_H 1" >>confdefs.h
+fi
+ac_fn_c_check_header_compile "$LINENO" "linux/sched.h" "ac_cv_header_linux_sched_h" "$ac_includes_default"
+if test "x$ac_cv_header_linux_sched_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LINUX_SCHED_H 1" >>confdefs.h
+
fi
ac_fn_c_check_header_compile "$LINENO" "linux/tipc.h" "ac_cv_header_linux_tipc_h" "$ac_includes_default"
if test "x$ac_cv_header_linux_tipc_h" = xyes
AC_CHECK_HEADERS([ \
alloca.h asm/types.h bluetooth.h conio.h direct.h dlfcn.h endian.h errno.h fcntl.h grp.h \
io.h langinfo.h libintl.h libutil.h linux/auxvec.h sys/auxv.h linux/fs.h linux/limits.h linux/memfd.h \
- linux/netfilter_ipv4.h linux/random.h linux/soundcard.h \
+ linux/netfilter_ipv4.h linux/random.h linux/soundcard.h linux/sched.h \
linux/tipc.h linux/wait.h netdb.h net/ethernet.h netinet/in.h netpacket/packet.h poll.h process.h pthread.h pty.h \
sched.h setjmp.h shadow.h signal.h spawn.h stropts.h sys/audioio.h sys/bsdtty.h sys/devpoll.h \
sys/endian.h sys/epoll.h sys/event.h sys/eventfd.h sys/file.h sys/ioctl.h sys/kern_control.h \
/* Define to 1 if you have the <linux/random.h> header file. */
#undef HAVE_LINUX_RANDOM_H
+/* Define to 1 if you have the <linux/sched.h> header file. */
+#undef HAVE_LINUX_SCHED_H
+
/* Define to 1 if you have the <linux/soundcard.h> header file. */
#undef HAVE_LINUX_SOUNDCARD_H