aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/spawn.cc
diff options
context:
space:
mode:
authorChristian Franke <christian.franke@t-online.de>2024-11-29 18:41:12 +0100
committerCorinna Vinschen <corinna@vinschen.de>2024-12-04 19:06:48 +0100
commit48b189245a135a16ea7dd16e24724820e8003221 (patch)
tree8d340c7b760ac288e9f7463f95778ea83f05d1da /winsup/cygwin/spawn.cc
parentc79954439e6d91dc6f421a761953f0d935c5f3d5 (diff)
downloadnewlib-48b189245a135a16ea7dd16e24724820e8003221.zip
newlib-48b189245a135a16ea7dd16e24724820e8003221.tar.gz
newlib-48b189245a135a16ea7dd16e24724820e8003221.tar.bz2
Cygwin: sched_setscheduler: accept SCHED_OTHER, SCHED_FIFO and SCHED_RR
If SCHED_OTHER is selected, set the Windows priority according to the nice value. If SCHED_FIFO or SCHED_RR is selected, preserve the nice value and set the Windows priority according to the sched_priority parameter. Signed-off-by: Christian Franke <christian.franke@t-online.de>
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r--winsup/cygwin/spawn.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 60a8299..7f9f2df 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -799,6 +799,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
}
child->start_time = time (NULL); /* Register child's starting time. */
child->nice = myself->nice;
+ child->sched_policy = myself->sched_policy;
postfork (child);
if (mode != _P_DETACH
&& (!child.remember () || !child.attach ()))