lkml.org 
[lkml]   [2009]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] FRV: Fix the section attribute on UP DECLARE_PER_CPU()
Date

Linus Torvalds <torvalds@linux-foundation.org> wrote:

> But yeah, I didn't look at all the details. It _looked_ pretty
> straightforward to just move the DEFINE/DECLARE stuff up, but there may well
> be something subtle I'm missing.

The problem is mainly one of #include recursion. There's way too much of it.

I wonder if we should replace the standard headerfile boilerplate:

#ifndef _THIS_HEADER_H
#define _THIS_HEADER_H
...
#endif /* _THIS_HEADER_H */

with something a bit nastier:

#ifndef _THIS_HEADER_H
#define _THIS_HEADER_H 1
...
#undef _THIS_HEADER_H
#define _THIS_HEADER_H 2
#elif _THIS_HEADER_H == 1
#error Recursive inclusion is not permitted
#endif /* _THIS_HEADER_H */

and make people break up their header files to avoid getting this error.

There are a number of problems with doing this, of course; the least of which
is that cpp has special code for handling the first case efficiently, IIRC.

David


\
 
 \ /
  Last update: 2009-04-15 13:45    [W:0.076 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site