From owner-freebsd-smp Fri Aug 9 8:56:39 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 53BFE37B400 for ; Fri, 9 Aug 2002 08:56:36 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA49A43E7B for ; Fri, 9 Aug 2002 08:55:04 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id C0F082A7D6; Fri, 9 Aug 2002 08:54:02 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: hiten@uk.FreeBSD.org Cc: Luigi Rizzo , Terry Lambert , Julian Elischer , smp@freebsd.org Subject: Re: how to create per-cpu variables in SMP kernels ? In-Reply-To: <20020808211507.17582.qmail@web21104.mail.yahoo.com> Date: Fri, 09 Aug 2002 08:54:02 -0700 From: Peter Wemm Message-Id: <20020809155402.C0F082A7D6@canning.wemm.org> Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hiten Pandya wrote: > --- Peter Wemm 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 message