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

Daniel Phillips
2002-05-25T22:57:52Z

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