]> sourceware.org Git - newlib-cygwin.git/commit
Rewrite scheduler functions getting and setting process and thread priority
authorCorinna Vinschen <corinna@vinschen.de>
Fri, 20 May 2016 15:38:22 +0000 (17:38 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Fri, 20 May 2016 15:38:22 +0000 (17:38 +0200)
commit450f557feee5dd4900e3fd4f16cbb6cabe89fbc6
tree3fff1c0bdeab6625a564954116d7951fb9488934
parent6ac6e7c2bdf7095071d8b02181e0646865c08792
Rewrite scheduler functions getting and setting process and thread priority

So far the scheduler priority handling is not POSIX compatible.
The priorities use a range of -14 up to +15, which means it's not clear
if the POSIX-required return value of -1 in case of an error is *really*
an error or just the valid priority value -1.  Even more confusing, -14
is the *max* value and 15 is the *min* value.  Last but not least this
range doesn't match the POSIX requirement of at least 32 priority values.

This patch cleans up scheduler priority handling and moves the valid
priority range to 1 (min) - 32 (max).  It also adds a function
sched_get_thread_priority() which will help to make thread priority
more POSIX-like.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/cygwin/sched.cc
winsup/cygwin/thread.cc
This page took 0.035176 seconds and 5 git commands to generate.