From owner-freebsd-arch Fri Feb 1 10: 0:26 2002 Delivered-To: freebsd-arch@freebsd.org Received: from rwcrmhc54.attbi.com (rwcrmhc54.attbi.com [216.148.227.87]) by hub.freebsd.org (Postfix) with ESMTP id 0A7E437B400 for ; Fri, 1 Feb 2002 10:00:16 -0800 (PST) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc54.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020201180015.XXVA7443.rwcrmhc54.attbi.com@InterJet.elischer.org>; Fri, 1 Feb 2002 18:00:15 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id KAA67167; Fri, 1 Feb 2002 10:00:00 -0800 (PST) Date: Fri, 1 Feb 2002 10:00:00 -0800 (PST) From: Julian Elischer To: Terry Lambert Cc: Daniel Eischen , arch@FreeBSD.ORG Subject: Re: FWIW... maybe this way already? In-Reply-To: <3C5A4E44.6380900B@mindspring.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG this is what mach threads did.. nowm the question is: how do you know where the beginning of the stack is? On Fri, 1 Feb 2002, Terry Lambert wrote: > Linux did what I think is an incredibly clever thing. > > They put the current CPU at the beginning of the stack, > and then change it when/if they migrate the process. > > Since KSEs have stacks, as well, you could put the > process and thread ID after the CPU ID, there. > > Saves weirding out a register to get the CPU, PID, TID, > since the stack base is always known. > > FWIW. > > -- Terry > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message