From 162deed59530613431b06206352d80f958870305 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 15 Apr 2011 09:22:14 +0000 Subject: * 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. --- winsup/cygwin/thread.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'winsup/cygwin/thread.cc') 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) -- cgit v1.2.3