From owner-freebsd-threads@FreeBSD.ORG Tue Jul 1 06:30:06 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 45F7937B401 for ; Tue, 1 Jul 2003 06:30:06 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7FA0F43FBD for ; Tue, 1 Jul 2003 06:30:05 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h61DU4AI011843; Tue, 1 Jul 2003 09:30:04 -0400 (EDT) Date: Tue, 1 Jul 2003 09:30:04 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Petri Helenius In-Reply-To: <007601c33fb2$6c5d2c80$f9d7473e@PETEX31> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: David Xu cc: freebsd-threads@freebsd.org Subject: Re: rtprio and kse X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2003 13:30:06 -0000 On Tue, 1 Jul 2003, Petri Helenius wrote: > > It is legitimate to want a single (or set) of threads to > > have real-time priority and not the others. Since the > > priority is in the KSEG, this is possible to do without > > fork()ing. > > > > Dan Eischen > > > So to summarize, in order to achieve rtprio for one of the ~dozen threads > in the process, winthout affecting the rest of the threads in the same process, > set PTHREAD_SCOPE_SYSTEM when creating the thread > and ask for rtprio in the thread after it has started? I don't understand. Do you want all threads in the process to be affected by rtprio()? Or are you saying there are more than 12 threads in the process, but you only want rtprio() to affect those 12 threads? As I've said before, rtprio() affects the thread's calling KSEG. Threads created with scope system each get their own KSEG. Threads created with scope process all run in the same KSEG. Threads never migrate between KSEGs. That's all you need to know. Do with it what you will. -- Dan Eischen