* 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.
This commit is contained in:
Yaakov Selkowitz
2011-04-15 09:22:14 +00:00
parent b909b457d0
commit 162deed595
6 changed files with 25 additions and 2 deletions

View File

@@ -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)