From owner-freebsd-arch Fri Feb 1 16:55: 2 2002 Delivered-To: freebsd-arch@freebsd.org Received: from avocet.prod.itd.earthlink.net (avocet.mail.pas.earthlink.net [207.217.120.50]) by hub.freebsd.org (Postfix) with ESMTP id C8B6637B42B for ; Fri, 1 Feb 2002 16:54:08 -0800 (PST) Received: from pool0542.cvx40-bradley.dialup.earthlink.net ([216.244.44.32] helo=mindspring.com) by avocet.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16WoRR-0000IG-00; Fri, 01 Feb 2002 16:54:05 -0800 Message-ID: <3C5B38A7.87322161@mindspring.com> Date: Fri, 01 Feb 2002 16:53:59 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Julian Elischer Cc: Daniel Eischen , arch@FreeBSD.ORG Subject: Re: FWIW... maybe this way already? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 Julian Elischer wrote: > > this is what mach threads did.. > nowm the question is: how do you know where the beginning of the stack is? Hah! I _knew_ it tickled a memory! But to answer... User space register pointing to the stack for each system call, before the switch to the kernel stack. You can either maintain a list of stack bases, as instanced, passed into the kernel, in which case when you later get a thread entry, you can bsearch them, or you can search each time backwards to the unmapped page, with a guarantee of a page boundary start (this would be slow enough that it would outweight the advantages of doing this, IMO). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message