Date: Fri, 09 Aug 2002 08:54:02 -0700 From: Peter Wemm <peter@wemm.org> To: hiten@uk.FreeBSD.org Cc: Luigi Rizzo <rizzo@icir.org>, Terry Lambert <tlambert2@mindspring.com>, Julian Elischer <julian@elischer.org>, smp@freebsd.org Subject: Re: how to create per-cpu variables in SMP kernels ? Message-ID: <20020809155402.C0F082A7D6@canning.wemm.org> In-Reply-To: <20020808211507.17582.qmail@web21104.mail.yahoo.com>
index | next in thread | previous in thread | raw e-mail
Hiten Pandya wrote: > --- Peter Wemm <peter@wemm.org> wrote: > > However, gcc might save us at some point: > > http://gcc.gnu.org/ml/gcc-patches/2002-05/msg01719.html > > > > It adds a __thread specifier that we could just as easily use for the > > per-cpu > > data implementation. eg: > > + __thread int i; > > + extern __thread struct state s; > > + static __thread char *p; > > > > Now imagine: extern __thread struct proc *curproc; > > For example, if this was used, it would not let us compile stuff on Intel's > compiler, or others. Not a major issue in my books, but maybe for others it > is. And you think the current gcc-specific code compiles well on other compilers? Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the messagehelp
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020809155402.C0F082A7D6>
