Re: [PATCH] 2.5.21 - list.h cleanup

From: Rusty Russell (rusty@rustcorp.com.au)
Date: Tue Jun 11 2002 - 20:10:38 EST


In message <3D060EC8.321A0D66@mvista.com> you write:
> On wonders if it might be useful to split header files into
> say for example, list_d.h and list_i.h with the declarations
> in the "_d.h" and inlines in the "_i.h". Then we could move
> the "_i.h" includes to the end of the include list. Yeah, I
> know, too many includes in includes to work.

The only really sane way to implement "CONFIG_SMALL_NO_INLINES" that I
can think of is to have headers do

#include <linux/inline.h>

inline_me int function(int x) { return x++; }

Then inline.h contain:

#include <linux/config.h>
#ifdef CONFIG_SMALL_NO_INLINES
#define inline_me
#else
#define inline_me static inline
#endif

And if do a final compile of a file "inlines.c" like so if
CONFIG_SMALL_NO_INLINES is set:

#include <linux/config.h>
#undef CONFIG_SMALL_NO_INLINES

/* Instantiate one of each inline for real: auto-generated list */

#include <linux/header1.h>
#include <linux/header2.h>
#include <linux/header3.h>
#include <linux/header4.h>

Expect an implementation in... um... well, someone else perhaps?
Rusty.

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:23 EST