From owner-freebsd-current@FreeBSD.ORG Thu May 29 05:19:03 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AAF5DDA; Thu, 29 May 2014 05:19:03 +0000 (UTC) Received: from COL004-OMC2S1.hotmail.com (col004-omc2s1.hotmail.com [65.55.34.75]) by mx1.freebsd.org (Postfix) with ESMTP id 74F252CB3; Thu, 29 May 2014 05:19:03 +0000 (UTC) Received: from COL131-DS1 ([65.55.34.71]) by COL004-OMC2S1.hotmail.com with Microsoft SMTPSVC(7.5.7601.22678); Wed, 28 May 2014 22:19:02 -0700 X-TMN: [8/Dhvyf85ro1+ZQo2SEmR/ImVRfCLx7w] X-Originating-Email: [fredhps10@hotmail.com] Message-ID: From: Fred Pedrisa To: "'Adrian Chadd'" References: In-Reply-To: Subject: RES: Thread Scheduler Priority Date: Thu, 29 May 2014 02:19:26 -0300 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQFLhKv5j3QmiEbRctVokj9BOKz7BwMaixgYnEYdZ0A= Content-Language: pt-br X-OriginalArrivalTime: 29 May 2014 05:19:02.0449 (UTC) FILETIME=[80DFAA10:01CF7AFD] Cc: 'freebsd-current' X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2014 05:19:03 -0000 Hello, Yes. -----Mensagem original----- De: owner-freebsd-current@freebsd.org [mailto:owner-freebsd-current@freebsd.org] Em nome de Adrian Chadd Enviada em: quinta-feira, 29 de maio de 2014 02:18 Para: Fred Pedrisa Cc: freebsd-current Assunto: Re: Thread Scheduler Priority are you doing this all as root? -a On 28 May 2014 22:12, Fred Pedrisa wrote: > Hi, Guys. > > > > How can I adjust a certain thread to have the maximum system priority > in the scheduler ? > > > > I've tried doing it this way : > > > > /* Set thread priority. > */ > > if > (pthread_getschedparam(ts[gnThreadID], &police, ¶m[gnThreadID]) != > 0) > > { > > error > ("Unable to get priority"); > > return > 1; > > } > > > param[gnThreadID].sched_priority = 99; > > if > (pthread_setschedparam(ts[gnThreadID], police, ¶m[gnThreadID]) != > 0) > > { > > error("Unable to set priority"); > > return 1; > > } > > > > However, in 'top', I don't see the process threads switching to -92 > priority, like other threads in the system, is something I did wrong > or maybe I might be missing something ? > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"