From owner-freebsd-current@FreeBSD.ORG Mon Aug 3 17:45:40 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD1951065677 for ; Mon, 3 Aug 2009 17:45:40 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outT.internet-mail-service.net (outt.internet-mail-service.net [216.240.47.243]) by mx1.freebsd.org (Postfix) with ESMTP id C3B1F8FC22 for ; Mon, 3 Aug 2009 17:45:40 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 0DEA5A300F; Mon, 3 Aug 2009 10:45:48 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id EA0352D600E; Mon, 3 Aug 2009 10:45:39 -0700 (PDT) Message-ID: <4A77224A.9020706@elischer.org> Date: Mon, 03 Aug 2009 10:45:46 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: John Baldwin References: <4A75691E.9070401@elischer.org> <200908031305.25714.jhb@freebsd.org> In-Reply-To: <200908031305.25714.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, FreeBSD Current Subject: Re: possible readability improvement for i386 pcpu macros: X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 17:45:41 -0000 John Baldwin wrote: > On Sunday 02 August 2009 6:23:26 am Julian Elischer wrote: >> if you have to ever look at the output of the cpp then this removes a >> number of things you have to puzzle over in the output of PCPU_SET() >> and friends. >> >> >> I don't know if it applies to the other architectures. > > It probably applies to amd64. Also, simplifying the amount of code the macros > generate can reduce compile time. That is why Peter added __curthread() so > that all the curthread references did not have to compile a fully expanded > PCPU_GET() macro each time. It gave a noticable reduction in kernel compile > time. > turns out it is already in amd64..