Re: [rfc,patch] breaking up sched.h

Daniel Phillips (phillips@bonn-fries.net)
Sun, 26 May 2002 00:57:34 +0200


On Friday 24 May 2002 22:34, Tim Schmielau wrote:
> While it's quite common to do "current->foo", every file doing
> so needs to #include <linux/sched.h> for the declaration of
> task_struct.
> In order to reduce the number of #include <linux/sched.h>, I'd propose to
> move task_struct to a separate header file (patch below), and include it
> from <asm/current.h>.

Such separation of data vs function declarations is a good thing. This
results in a source tree which is easier to work with and contains fewer
strange hacks to get around include order problems. Possibly, the kernel
may end up compiling faster as well, if some of the includes aimed merely
at obtaining the data definitions don't have to pick up the (much
bulkier) operation definitions as well.

This is the same technique I used in my 'early_page' patch set, which
gave me the ability to rewrite all the address operations in the page.h
and pgtable.h headers as inline functions instead of macros.

-- 
Daniel
-
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/