Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jul 2010 15:03:14 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        src-committers@freebsd.org
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org
Subject:   Re: svn commit: r210623 - in head/sys: amd64/include i386/include ia64/include
Message-ID:  <201007291503.14225.jhb@freebsd.org>
In-Reply-To: <201007291844.o6TIiAeB023670@svn.freebsd.org>
References:  <201007291844.o6TIiAeB023670@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, July 29, 2010 2:44:10 pm John Baldwin wrote:
> Author: jhb
> Date: Thu Jul 29 18:44:10 2010
> New Revision: 210623
> URL: http://svn.freebsd.org/changeset/base/210623
> 
> Log:
>   Mark the __curthread() functions as __pure2 and remove the volatile keyword
>   from the inline assembly.  This allows the compiler to cache invocations of
>   curthread since it's value does not change within a thread context.

Other platforms can add this feature if desired by adding a similar
__curthread() inline function.  curthread is a bit special in this regards as
opposed to other per-CPU values.  I think Peter originally added the
__curthread() inline simply to speed up compile times as the PCPU_*() macros
are a lot of work for the compiler, so that can be another reason to do it on
other platforms.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007291503.14225.jhb>