Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Aug 2009 19:20:34 +0200
From:      Alban Hertroys <dalroi@solfertje.student.utwente.nl>
To:        Julian Elischer <julian@elischer.org>
Cc:        Christoph Mallon <christoph.mallon@gmx.de>, FreeBSD Current <current@freebsd.org>
Subject:   Re: puzzling code in pcpu stuff
Message-ID:  <905E6A82-3E1D-4A74-936E-2B2B77C7B147@solfertje.student.utwente.nl>
In-Reply-To: <4A75C50E.5020203@elischer.org>
References:  <4A756214.8010002@elischer.org> <4A756BA1.90002@gmx.de> <9A2BA686-016B-4B60-A247-7321C1E7F51A@solfertje.student.utwente.nl> <4A75C50E.5020203@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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!





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?905E6A82-3E1D-4A74-936E-2B2B77C7B147>