This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: pthread_create and priorities
- To: Timothy Gee <timmygee at us dot ibm dot com>
- Subject: Re: pthread_create and priorities
- From: Robert Collins <robert dot collins at itdomain dot com dot au>
- Date: 03 Aug 2001 15:25:36 +1000
- Cc: cygwin at cygwin dot com
- References: <OFE5BEA8FF.569DAB4A-ON85256A9C.0065FA13@raleigh.ibm.com>
On 02 Aug 2001 14:49:28 -0400, Timothy Gee wrote:
> I have looked through the achieves and haven't seen this addressed.
>
> I want to start up a pthread with a given priority. The documentation seems
> clear enough, however, the code I wrote doesn't work. The thread always
> starts with a default priority. I can use a similar procedure within the
> thread to adjust priority and that works. What have I overlooked? I am
> running DLL 1.3.2 on Win NT (Patch 5.0, I believe).
>
Quoting from the HEAD thread.cc file:
In pthread::create:
{
/* FIXME: set the priority appropriately for system contention
scope */
if (attr.inheritsched == PTHREAD_EXPLICIT_SCHED)
{
/* FIXME: set the scheduling settings for the new thread */
/* sched_thread_setparam (win32_obj_id, attr.schedparam); */
}
ResumeThread (win32_obj_id);
}
So the answer is: It's not implemented yet :-/.
given the code to do it is present, but commented, I'd suggest I
encountered a bug with it, and disabled it for reliability -
unfortunately I don't recall what issue I did have.
Rob
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/