[lkml]   [2002]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] break out task_struct from sched.h
Tim Schmielau wrote:

> This patch separates struct task_struct from <linux/sched.h> to
> a new header <linux/task_struct.h>, so that dereferencing 'current'
> doesn't require to #include <linux/sched.h> and all of the 138 files it
> drags in.
> This is a preparatory step (and currently part of) the patch to remove
> 614 superfluous #includes of <linux/sched.h> at

I tried something similar before: I seperated out mm_struct from sched.h
so that mm.h does not have to include sched.h any more. At that time,
the results were poor, because most of the files that include mm.h but
not sched.h actually need 'current' or something else from sched.h
and I then had to include sched.h by hand in them.

With your work, it probably makes sense to look into this again.
Note that 241 of your 614 files that don't need sched.h still include
it through either linux/mm.h or linux/interrupt.h, so don't gain anything

There are some other headers that are critical as well (e.g.
pci.h->device.h->sched.h), but afaics mm.h and interrupt.h are the most
common ones.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:29    [W:0.055 / U:12.516 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site