From owner-freebsd-threads@FreeBSD.ORG Sun Jun 29 15:40:34 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 6F43937B401; Sun, 29 Jun 2003 15:40:34 -0700 (PDT) Received: from silver.he.iki.fi (silver.he.iki.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 397B744020; Sun, 29 Jun 2003 15:40:33 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from PETEX31 (gprs-prointernet-3e47d544.mobile.inet.fi [62.71.213.68]) by silver.he.iki.fi (8.12.9/8.11.4) with SMTP id h5TMeGsL031751; Mon, 30 Jun 2003 01:40:21 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <005001c33e8f$6d90d6c0$44d5473e@PETEX31> From: "Petri Helenius" To: References: Date: Mon, 30 Jun 2003 00:40:08 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 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: Sun, 29 Jun 2003 22:40:34 -0000 > > The rtprio() call affects the KSEG in which the thread runs. > So it is the KSEG that has the realtime priority, and all > threads that run in that KSEG will be affected. This doesn't > affect other KSEGs, so if you are creating system scope > threads (each has their own KSEG and KSE), they will only > be affected if you call rtprio() from their threads. > So if I interpret this correctly, to achieve the "expected" result, one should link with -lthr, not -lkse? Expected result being priorities apply only to threads which call for it. Does -lthr have any (known) issues with spinlocks like linuxthreads has, where a thread with rtprio going into a spinlock might monopolize the CPU and the other thread never gets a quantum to actually release the lock? Pete