From owner-cvs-all Sat Sep 23 15:44:32 2000 Delivered-To: cvs-all@freebsd.org Received: from pike.osd.bsdi.com (pike.osd.bsdi.com [204.216.28.222]) by hub.freebsd.org (Postfix) with ESMTP id 2047F37B42C; Sat, 23 Sep 2000 15:44:28 -0700 (PDT) Received: from foo.osd.bsdi.com (root@foo.osd.bsdi.com [204.216.28.137]) by pike.osd.bsdi.com (8.11.0/8.9.3) with ESMTP id e8NMiBi97585; Sat, 23 Sep 2000 15:44:11 -0700 (PDT) (envelope-from jhb@foo.osd.bsdi.com) Received: (from jhb@localhost) by foo.osd.bsdi.com (8.11.0/8.11.0) id e8NMged18449; Sat, 23 Sep 2000 15:42:40 -0700 (PDT) (envelope-from jhb) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Sat, 23 Sep 2000 15:42:40 -0700 (PDT) Organization: BSD, Inc. From: John Baldwin To: Bruce Evans Subject: Re: cvs commit: src/sys/i386/include mutex.h src/sys/alpha/inclu Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Jason Evans Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 23-Sep-00 Bruce Evans wrote: > On Fri, 22 Sep 2000, Jason Evans wrote: > >> jasone 2000/09/22 17:00:50 PDT >> >> Modified files: >> sys/i386/include mutex.h >> sys/alpha/include mutex.h >> Log: >> #include in order to get curproc. This seems to be the >> #lesser >> of two evils; the greater evil is requiring sys/proc.h to be included >> before including machine/mutex.h. > > The correct implementation is none of the above: > >#ifndef SMP > extern struct proc *curproc; >#endif curproc is no longer a variable like that. It is now a #define to a function to extract per-cpu data. On UP systems, this is simplfied by having it just reference gd_curproc. This change would be a bug. Especially if you #include both proc.h and mutex.h in some other header. > Bruce -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message