From owner-freebsd-threads@FreeBSD.ORG Thu Apr 17 00:39:00 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 E45E137B404 for ; Thu, 17 Apr 2003 00:39:00 -0700 (PDT) Received: from heron.mail.pas.earthlink.net (heron.mail.pas.earthlink.net [207.217.120.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C1BE43FBF for ; Thu, 17 Apr 2003 00:39:00 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0126.cvx22-bradley.dialup.earthlink.net ([209.179.198.126] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 1963yo-0005Xe-00; Thu, 17 Apr 2003 00:38:46 -0700 Message-ID: <3E9E59B8.455970F2@mindspring.com> Date: Thu, 17 Apr 2003 00:37:28 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Daniel Eischen References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4f24b8e6c39d4a9f11ac934cea6b21f87387f7b89c61deb1d350badd9bab72f9c350badd9bab72f9c cc: David Xu cc: freebsd-threads@freebsd.org Subject: Re: libpthread patch 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: Thu, 17 Apr 2003 07:39:01 -0000 Daniel Eischen wrote: > The critical section is to prevent the thread from being > swapped out by the kernel and sent to another KSE. That's > it; it's not meant to do the same thing as locking. > There's per-kse stuff that needs to be accessed that > isn't correct if the thread gets run on another KSE, > regardless of whether or not a lock protects it. I guess the next question is why thread-lending (ala NT, MACH, etc.) isn't supportable. > If it wasn't possible for the kernel to send completed > threads from one KSE to another (within the same KSE > group), we probably wouldn't need critical sections > (at least as currently implemented). Is there a particular performance/other reason this is allowed? -- Terry