From owner-freebsd-current@FreeBSD.ORG Sun Aug 2 17:20:37 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81788106566C for ; Sun, 2 Aug 2009 17:20:37 +0000 (UTC) (envelope-from dalroi@solfertje.student.utwente.nl) Received: from solfertje.student.utwente.nl (solfertje.student.utwente.nl [130.89.167.40]) by mx1.freebsd.org (Postfix) with ESMTP id 372C78FC17 for ; Sun, 2 Aug 2009 17:20:37 +0000 (UTC) (envelope-from dalroi@solfertje.student.utwente.nl) Received: from localhost (localhost [127.0.0.1]) by solfertje.student.utwente.nl (Postfix) with SMTP id 3A8C58030 for ; Sun, 2 Aug 2009 19:20:36 +0200 (CEST) Received: from hollewijn.internal (hollewijn.internal [10.236.150.4]) by solfertje.student.utwente.nl (Postfix) with ESMTP id 3E14C802A; Sun, 2 Aug 2009 19:20:34 +0200 (CEST) Message-Id: <905E6A82-3E1D-4A74-936E-2B2B77C7B147@solfertje.student.utwente.nl> From: Alban Hertroys To: Julian Elischer In-Reply-To: <4A75C50E.5020203@elischer.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Sun, 2 Aug 2009 19:20:34 +0200 References: <4A756214.8010002@elischer.org> <4A756BA1.90002@gmx.de> <9A2BA686-016B-4B60-A247-7321C1E7F51A@solfertje.student.utwente.nl> <4A75C50E.5020203@elischer.org> X-Mailer: Apple Mail (2.935.3) X-DSPAM-Result: Innocent X-DSPAM-Processed: Sun Aug 2 19:20:35 2009 X-DSPAM-Confidence: 1.0000 X-DSPAM-Probability: 0.0023 X-DSPAM-Signature: 930,4a75cae310135211110206 X-DSPAM-Factors: 27, many, 0.40000, could, 0.40000, but, 0.40000, From*Alban, 0.40000, just, 0.40000, Date*Aug+2009, 0.40000, References*<4A756214.8010002, 0.40000, Mime-Version*Message, 0.40000, Cc*Mallon, 0.40000, your+message!, 0.40000, preprocessor+of, 0.40000, missed+the, 0.40000, an, 0.40000, an, 0.40000, References*<9A2BA686, 0.40000, Speaking+as, 0.40000, trees, 0.40000, trees, 0.40000, Cc*FreeBSD+Current, 0.40000, developers+has, 0.40000, many+>, 0.40000, cut, 0.40000, cut, 0.40000, of, 0.40000, of, 0.40000, >+Alban, 0.40000, none, 0.40000 Cc: Christoph Mallon , FreeBSD Current Subject: Re: puzzling code in pcpu stuff 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: Sun, 02 Aug 2009 17:20:37 -0000 On 2 Aug 2009, at 18:55, Julian Elischer wrote: > Alban Hertroys wrote: >> On 2 Aug 2009, at 12:34, Christoph Mallon wrote: >>> Julian Elischer schrieb: >>>> I simplified the output of the preprocessor for a PCPU_SET(xx, >>>> newval) >>>> (to look at it). >> Speaking as an outsider I'd better be careful with any criticism, >> but the first thing I noticed here was the lack of comments. From >> Julian's question it seems obvious that this function could do with >> some. I wonder what people would make of this in a couple of years >> when none of the (then) active developers has any intimate >> knowledge of the workings of functions like this one? > > there are no comments in this cut-n-paste because it is the output > of the C preprocessor.. of course the source doesn't have many > comments either.. (in i386/include/pcpu.h) Ah, I missed the first line of your message! Yes, looking at the macro definitions that's a lot more like I expected. It's just an assignment to *__PCPU_PTR(name), which is quite clear actually. A bit of a relief I must say :) Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:930,4a75cae310135211110206!