From owner-cvs-sys Tue Aug 12 08:57:32 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id IAA00347 for cvs-sys-outgoing; Tue, 12 Aug 1997 08:57:32 -0700 (PDT) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id IAA00323; Tue, 12 Aug 1997 08:57:22 -0700 (PDT) Received: (from msmith@localhost) by genesis.atrad.adelaide.edu.au (8.8.5/8.7.3) id BAA08791; Wed, 13 Aug 1997 01:27:05 +0930 (CST) From: Michael Smith Message-Id: <199708121557.BAA08791@genesis.atrad.adelaide.edu.au> Subject: Re: cvs commit: src/sys/kern init_main.c In-Reply-To: <199708121549.JAA19349@Ilsa.StevesCafe.com> from Steve Passe at "Aug 12, 97 09:49:12 am" To: smp@csn.net (Steve Passe) Date: Wed, 13 Aug 1997 01:27:04 +0930 (CST) Cc: msmith@atrad.adelaide.edu.au, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-sys@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Steve Passe stands accused of saying: > Mike, > > > > Log: > > > Fixes kern/3835: SMP kernel crash on enable "dumps on wd0" > > > > > > - SMP: set value of curproc in main(), before the SYSINIT stuff > > > > If I read this correctly, this means that nothing hung off a SYSINIT() > > macro needs to worry about curproc being invalid, ie. one can > > explicitly expect curproc to be useful for subsystem locking etc. at a > > very early stage? > > no, its a hack to prevent code in configure() from panic()ing when trying > to dereference (struct proc*)p->xxx thingies. there is code that does this > early in the boot process that knows that curproc is incomplete and is careful > to not use the missing parts. There is nothing SMP specific about this. The > only reason its needed is that the UP kernel "sets" it at compile time via: Ok, perhaps I should be more explicit : - at what point is curproc filled out adequately for use with lockmgr() and friends? - if I don't know "when" I am, how can I work this out? -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[