Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Subject: Re: pthread_create and priorities From: Robert Collins To: Timothy Gee Cc: cygwin AT cygwin DOT com In-Reply-To: References: 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/