Re: puzzling code in pcpu stuff

From: Alban Hertroys <dalroi_at_solfertje.student.utwente.nl>
Date: Sun, 2 Aug 2009 19:20:34 +0200
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!
Received on Sun Aug 02 2009 - 15:20:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:53 UTC