Messages in this thread | | | From | David Howells <> | Subject | Re: [PATCH] FRV: Fix the section attribute on UP DECLARE_PER_CPU() | Date | Wed, 15 Apr 2009 12:40:32 +0100 |
| |
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
| |