From owner-freebsd-smp Thu Aug 8 14:15:11 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 593BB37B401 for ; Thu, 8 Aug 2002 14:15:08 -0700 (PDT) Received: from web21104.mail.yahoo.com (web21104.mail.yahoo.com [216.136.227.106]) by mx1.FreeBSD.org (Postfix) with SMTP id D905743E42 for ; Thu, 8 Aug 2002 14:15:07 -0700 (PDT) (envelope-from hitmaster2k@yahoo.com) Message-ID: <20020808211507.17582.qmail@web21104.mail.yahoo.com> Received: from [62.254.0.5] by web21104.mail.yahoo.com via HTTP; Thu, 08 Aug 2002 14:15:07 PDT Date: Thu, 8 Aug 2002 14:15:07 -0700 (PDT) From: Hiten Pandya Reply-To: hiten@uk.FreeBSD.org Subject: Re: how to create per-cpu variables in SMP kernels ? To: Peter Wemm , Luigi Rizzo Cc: Terry Lambert , Julian Elischer , smp@freebsd.org In-Reply-To: <20020808171105.ABA822A7D6@canning.wemm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 --- 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. P.S. jFYI -- Hiten __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message