From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21599 invoked by alias); 8 Mar 2008 17:56:16 -0000 Received: (qmail 21591 invoked by uid 22791); 8 Mar 2008 17:56:16 -0000 X-Spam-Check-By: sourceware.org Received: from relay01.slacker.com (HELO relay01.slacker.com) (207.158.48.131) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 08 Mar 2008 17:55:58 +0000 Received: from BBMAIL.corp.bbi.com (bbmail.corp.bbi.com [10.11.1.25]) by relay01.slacker.com (Postfix) with SMTP id 833051F0093 for ; Sat, 8 Mar 2008 09:55:54 -0800 (PST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: trouble with pthread_attr_setschedparam() Date: Sat, 08 Mar 2008 17:56:00 -0000 Message-ID: <40AB5A80E5E562409254E65CBACFE2BD01B90C47@BBMAIL.corp.bbi.com> From: "Phil Pellouchoud" To: X-IsSubscribed: yes Mailing-List: contact pthreads-win32-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sourceware.org X-SW-Source: 2008/txt/msg00005.txt.bz2 Hi, I am having trouble getting pthread_attr_setschedparam() to work. I can call the function, and I don't get an error back, but when I go to get the priority, I get back zero, no matter what I set it to. ---- code snippet ---- -- main code. pthread_attr_init() pthread_attr_setdetachstate(...PTHREAD_CREATE_JOINABLE) pthread_attr_getschedparam(sp) sp.sched_priority =3D 10; pthread_attr_setschedparam(sp) pthread_create(...) pthread_attr_destroy() -- thread function static void* __cdecl ThreadFunc(void* pArg) int priority(0); pthread_attr_init() pthread_attr_getschedparam(sp) // right here, sp.sched_priority is always zero!!! pthread_attr_destroy() ---- code snippet ---- Also, is there any way to set the priority for a child thread after it has been created? Maybe a better way to ask that question is if there is a way to set a priority for a child thread from a parent thread? =20 -phil