Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Subject: Re: pthread_create and priorities
From: Robert Collins <robert.collins@itdomain.com.au>
To: Timothy Gee <timmygee@us.ibm.com>
Cc: cygwin@cygwin.com
In-Reply-To: <OFE5BEA8FF.569DAB4A-ON85256A9C.0065FA13@raleigh.ibm.com>
References: <OFE5BEA8FF.569DAB4A-ON85256A9C.0065FA13@raleigh.ibm.com>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Message-Id: <996816284.9688.7.camel@lifelesswks>
Mime-Version: 1.0
X-Mailer: Evolution/0.11 (Beta Release)
Date: 03 Aug 2001 15:25:36 +1000
X-OriginalArrivalTime: 03 Aug 2001 05:11:27.0485 (UTC) FILETIME=[BFA02AD0:01C11BDA]

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/

