diff options
author | Yaakov Selkowitz <yselkowi@redhat.com> | 2011-04-15 09:22:14 +0000 |
---|---|---|
committer | Yaakov Selkowitz <yselkowi@redhat.com> | 2011-04-15 09:22:14 +0000 |
commit | 162deed59530613431b06206352d80f958870305 (patch) | |
tree | 9c8d2ede9ace4a3d03b91c7af3c8135edb5373cb /winsup/cygwin/thread.cc | |
parent | b909b457d0329d1a9e1564fe88ac916142e250e8 (diff) | |
download | cygnal-162deed59530613431b06206352d80f958870305.tar.gz cygnal-162deed59530613431b06206352d80f958870305.tar.bz2 cygnal-162deed59530613431b06206352d80f958870305.zip |
* 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.cc | 11 |
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) |