From owner-cvs-all Wed Jan 10 20:28:40 2001 Delivered-To: cvs-all@freebsd.org Received: from aslan.scsiguy.com (aslan.scsiguy.com [63.229.232.106]) by hub.freebsd.org (Postfix) with ESMTP id 704FD37B698; Wed, 10 Jan 2001 20:28:14 -0800 (PST) Received: from scsiguy.com (localhost [127.0.0.1]) by aslan.scsiguy.com (8.11.0/8.9.3) with ESMTP id f0B4Rcs23445; Wed, 10 Jan 2001 21:28:08 -0700 (MST) (envelope-from gibbs@scsiguy.com) Message-Id: <200101110428.f0B4Rcs23445@aslan.scsiguy.com> X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 To: John Baldwin Cc: =?ISO-8859-1?Q?G=E9rard_Roudier?= , Jake Burkholder , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, Bruce Evans Subject: Re: cvs commit: src/sys/alpha/alpha interrupt.c machdep.c mp_mac In-Reply-To: Your message of "Wed, 10 Jan 2001 15:53:58 PST." Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Date: Wed, 10 Jan 2001 21:27:38 -0700 From: "Justin T. Gibbs" Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >No, shared variables are just variables. Here is the problem. There is= no >'curproc' variable. There is a gd_curproc member of a struct globaldata= , and >each CPU has a struct globaldata tied to it. We can obtain it via >PCPU_GET(curproc), or set it via PCPU_SET(curproc, myproc). Having a 'c= urproc >' >"magic" variable that doesn't exist that we assume we can read and write= to >like any other variable is a lot more hokie than admitting that we are >accessing a special variable in a special way. Anyone touching these variables had better understand what they are for and how they operate. I think our developers are smart enough to underst= and this without ugly upper-case macros. Heck "errno" is not spelled PTHREAD_GET(errno), or PTHREAD_SET(errno, error) and still people seem to be able to write useful threaded apps. 8-) The only thing that worries me about curproc and others like it is that the macros can polute the kernel name space. Just try using "curren= t" as a local variable or structure field in linux x86 to see what I mean. 8-) -- Justin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message