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:
authorYaakov Selkowitz <yselkowi@redhat.com>2011-04-15 13:22:14 +0400
committerYaakov Selkowitz <yselkowi@redhat.com>2011-04-15 13:22:14 +0400
commit162deed59530613431b06206352d80f958870305 (patch)
tree9c8d2ede9ace4a3d03b91c7af3c8135edb5373cb /winsup/cygwin/thread.cc
parentb909b457d0329d1a9e1564fe88ac916142e250e8 (diff)
* thread.cc (pthread_setschedprio): New function.
* include/pthread.h (pthread_setschedprio): Declare. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * cygwin.din (pthread_setschedprio): Export. * posix.sgml (std-notimpl) Move pthread_setschedprio from here... (std-susv4) ...to here.
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)