diff options
author | Christian Franke <christian.franke@t-online.de> | 2024-11-27 16:39:37 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2024-11-27 18:06:56 +0100 |
commit | 522f3e921aa034c6a146021a918ce8b479a9111e (patch) | |
tree | 523929536fb78afb9570bd166766e431333602ff /winsup/cygwin/sched.cc | |
parent | 153b51ee08efc39068ed2cc897855ea4aba5d96e (diff) | |
download | newlib-522f3e921aa034c6a146021a918ce8b479a9111e.zip newlib-522f3e921aa034c6a146021a918ce8b479a9111e.tar.gz newlib-522f3e921aa034c6a146021a918ce8b479a9111e.tar.bz2 |
Cygwin: sched_setscheduler: allow changes of the priority
Behave like sched_setparam() if the requested policy is identical
to the fixed value (SCHED_FIFO) returned by sched_getscheduler().
Fixes: 9a08b2c02eea ("* sched.cc: New file. Implement sched*.")
Signed-off-by: Christian Franke <christian.franke@t-online.de>
Diffstat (limited to 'winsup/cygwin/sched.cc')
-rw-r--r-- | winsup/cygwin/sched.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/sched.cc b/winsup/cygwin/sched.cc index 1874160..b8067d5 100644 --- a/winsup/cygwin/sched.cc +++ b/winsup/cygwin/sched.cc @@ -402,8 +402,11 @@ int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param) { + if (policy == SCHED_FIFO) /* returned by sched_getscheduler. */ + return sched_setparam (pid, param); + /* on win32, you can't change the scheduler. Doh! */ - set_errno (ENOSYS); + set_errno (EINVAL); return -1; } |