From owner-freebsd-threads@FreeBSD.ORG Mon Feb 21 04:53:28 2005 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 206C816A4CE; Mon, 21 Feb 2005 04:53:28 +0000 (GMT) Received: from pimout4-ext.prodigy.net (pimout4-ext.prodigy.net [207.115.63.98]) by mx1.FreeBSD.org (Postfix) with ESMTP id A164243D2F; Mon, 21 Feb 2005 04:53:27 +0000 (GMT) (envelope-from julian@elischer.org) Received: from [192.168.1.102] (adsl-68-124-206-88.dsl.snfc21.pacbell.net [68.124.206.88])j1L4rFHb156202; Sun, 20 Feb 2005 23:53:20 -0500 Message-ID: <42196937.3010902@elischer.org> Date: Sun, 20 Feb 2005 20:53:11 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050214 X-Accept-Language: en, hu MIME-Version: 1.0 To: David Xu References: <4217DD2A.4030603@freebsd.org> <42193303.2090500@elischer.org> <42194993.4060202@t2t2.com> In-Reply-To: <42194993.4060202@t2t2.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: Daniel Eischen cc: threads@freebsd.org cc: David Xu Subject: Re: thread accounting in libpthread 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: Mon, 21 Feb 2005 04:53:28 -0000 David Xu wrote: > > > Julian Elischer wrote: > >> David Xu wrote: >> >>> Daniel Eischen wrote: >>> >>>> ... >>>> >>>> since it will be the only thread in the queue. If N threads >>>> complete (assuming they are all at the same priority) then >>>> the first thread pulled from the completed list will be >>>> run first since it will be the first thread added to the >>>> run queue. >>>> >>>> >>>> >>> note that kernel adds completed thread in reversed order. >> >> >> >> I guess we could fix that easily with a tail pointer. No, I think that the kernel could queue up "completed" threads on the ksegrp in the reverse order to now by adding them to the end of the list instead of the head. nothing else need know except that function. > > > This will break binary compatible, userland can workaround it. The userland doesn't know the order they completed (except to assume that it is backwards) > > David Xu