From owner-freebsd-alpha Thu Sep 5 13:46:45 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F05FF37B635; Thu, 5 Sep 2002 13:46:33 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5A74E43E81; Thu, 5 Sep 2002 13:46:31 -0700 (PDT) (envelope-from ticso@cicely9.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) by srv1.cosmo-project.de (8.12.5/8.12.5) with ESMTP id g85KkR6K074404 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 5 Sep 2002 22:46:28 +0200 (CEST) (envelope-from ticso@cicely9.cicely.de) Received: from cicely9.cicely.de (cicely9.cicely.de [IPv6:3ffe:400:8d0:301:210:5aff:fe30:1c1a]) by cicely5.cicely.de (8.12.6/8.12.6) with ESMTP id g85KkPNk002349 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 5 Sep 2002 22:46:25 +0200 (CEST) (envelope-from ticso@cicely9.cicely.de) Received: from cicely9.cicely.de (localhost [127.0.0.1]) by cicely9.cicely.de (8.12.6/8.12.5) with ESMTP id g85KjxD3013305; Thu, 5 Sep 2002 22:45:59 +0200 (CEST) (envelope-from ticso@cicely9.cicely.de) Received: (from ticso@localhost) by cicely9.cicely.de (8.12.6/8.12.6/Submit) id g85KjwNH013304; Thu, 5 Sep 2002 22:45:58 +0200 (CEST) Date: Thu, 5 Sep 2002 22:45:58 +0200 From: Bernd Walter To: Andrew Gallatin Cc: ticso@cicely.de, John Baldwin , freebsd-alpha@FreeBSD.ORG Subject: Re: ithread preemption Message-ID: <20020905204558.GF13050@cicely9.cicely.de> Reply-To: ticso@cicely.de References: <15735.44660.835003.901974@grasshopper.cs.duke.edu> <15735.47204.905352.900631@grasshopper.cs.duke.edu> <20020905201443.GD13050@cicely9.cicely.de> <15735.48281.30915.800894@grasshopper.cs.duke.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15735.48281.30915.800894@grasshopper.cs.duke.edu> X-Operating-System: FreeBSD cicely9.cicely.de 5.0-CURRENT alpha User-Agent: Mutt/1.5.1i Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Thu, Sep 05, 2002 at 04:20:41PM -0400, Andrew Gallatin wrote: > > Bernd Walter writes: > > OK - I have some basic understandig problems here. > > > > Why should ithreads ever return to PAL? > > Because PAL initiates the interrupt and creates a stackframe on the > interrupted thread's kernel stack. It then calls the OSes interrupt > vector. In order to restore the state of the world to be like it was > before the interrupt happened, we need to return back to pal. That's clear, but this is not the ithread. ithreads never return - see ithread_loop() in kern_intr.c. > > Why is IPL raised while an ithread is running? > > Pal raises the IPL to the appropriate level to block further > interrupts from the same source before calling into the OS. > > > >From what I understood before the interrupt handler, which is called > > from PAL, just triggers the ithread, block the intline and returns. > > > > The -stable code is easier to understand.. As it was on the C64 =) -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message