Date: Wed, 10 Jan 2001 21:27:38 -0700 From: "Justin T. Gibbs" <gibbs@scsiguy.com> To: John Baldwin <jhb@FreeBSD.org> Cc: =?ISO-8859-1?Q?G=E9rard_Roudier?= <groudier@club-internet.fr>, Jake Burkholder <jake@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, Bruce Evans <bde@zeta.org.au> Subject: Re: cvs commit: src/sys/alpha/alpha interrupt.c machdep.c mp_mac Message-ID: <200101110428.f0B4Rcs23445@aslan.scsiguy.com> In-Reply-To: Your message of "Wed, 10 Jan 2001 15:53:58 PST." <XFMail.010110155358.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101110428.f0B4Rcs23445>