Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Feb 2002 10:00:00 -0800 (PST)
From:      Julian Elischer <julian@elischer.org>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        Daniel Eischen <eischen@pcnet1.pcnet.com>, arch@FreeBSD.ORG
Subject:   Re: FWIW... maybe this way already?
Message-ID:  <Pine.BSF.4.21.0202010959220.67160-100000@InterJet.elischer.org>
In-Reply-To: <3C5A4E44.6380900B@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0202010959220.67160-100000>