Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/thread.cc')
-rw-r--r--winsup/cygwin/thread.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
index 29674d4ed..87167b7f9 100644
--- a/winsup/cygwin/thread.cc
+++ b/winsup/cygwin/thread.cc
@@ -2306,6 +2306,17 @@ pthread_setschedparam (pthread_t thread, int policy,
return rv;
}
+extern "C" int
+pthread_setschedprio (pthread_t thread, int priority)
+{
+ if (!pthread::is_good_object (&thread))
+ return ESRCH;
+ int rv =
+ sched_set_thread_priority (thread->win32_obj_id, priority);
+ if (!rv)
+ thread->attr.schedparam.sched_priority = priority;
+ return rv;
+}
extern "C" int
pthread_setspecific (pthread_key_t key, const void *value)