From: Ingo Molnar <mingo@elte.hu>
To: "Kaywinnit L. Frye" <kaywinnit.lee.frye.2497@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Michal Nazarewicz <m.nazarewicz@samsung.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Evgeny Kuznetsov <EXT-Eugeny.Kuznetsov@nokia.com>
Subject: Re: [PATCH] wait: include linux/sched.h
Date: Fri, 6 May 2011 09:54:08 +0200 [thread overview]
Message-ID: <20110506075408.GI23166@elte.hu> (raw)
In-Reply-To: <1304372042-12098-1-git-send-email-kaywinnit.lee.frye.2497@gmail.com>
* Kaywinnit L. Frye <kaywinnit.lee.frye.2497@gmail.com> wrote:
> signal_pending(), schedule*() and TASK_* are used in various macros in
> wait.h and all defined in linux/sched.h
>
> Cc: Michal Nazarewicz <m.nazarewicz@samsung.com>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Greg Kroah-Hartman <gregkh@suse.de>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Evgeny Kuznetsov <EXT-Eugeny.Kuznetsov@nokia.com>
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Kaywinnit L. Frye <kaywinnit.lee.frye.2497@gmail.com>
> ---
> include/linux/wait.h | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/wait.h b/include/linux/wait.h
> index 3efc9f3..667a3d7 100644
> --- a/include/linux/wait.h
> +++ b/include/linux/wait.h
> @@ -22,6 +22,7 @@
> #include <linux/list.h>
> #include <linux/stddef.h>
> #include <linux/spinlock.h>
> +#include <linux/sched.h>
> #include <asm/system.h>
> #include <asm/current.h>
I'm quite sure this will break the build all around the place, because sched.h
itself uses wait.h primitives.
To fix these super-headers like sched.h and to make wait.h self-sufficient the
right and cleanest approach would be to split data types and primitive accessor
functions from higher level helper methods (which inevitably mix different
domains) and put them into two separate files.
We have a few such split files in the kernel tree, spinlock_types.h and
spinlock_api.h, and this concept works reasonably well.
So here we'd need wait_types.h and wait_api.h and of course sched_types.h and
sched_api.h.
For simplicity of migration wait_api.h could be wait.h itself and sched_api.h
could be sched.h itself.
That way we'd stop the exponential explosion of header file inter-dependencies
at its source and would create a clean hierarchy of data types (the *_types.h
files, which never include *_api.h files), plus the real *_api.h files that .c
files would use.
As a result we'd probably have faster build times and we could also remove a
lot of CPP macro hell which is currently used to work around dependency
spaghetti bugs.
Thanks,
Ingo
next prev parent reply other threads:[~2011-05-06 7:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-02 21:34 Kaywinnit L. Frye
2011-05-06 7:54 ` Ingo Molnar [this message]
2011-05-10 8:11 ` Peter Zijlstra
2011-05-10 10:36 ` Ingo Molnar
2011-05-10 11:07 ` Peter Zijlstra
2011-05-10 11:42 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110506075408.GI23166@elte.hu \
--to=mingo@elte.hu \
--cc=EXT-Eugeny.Kuznetsov@nokia.com \
--cc=a.p.zijlstra@chello.nl \
--cc=gregkh@suse.de \
--cc=kaywinnit.lee.frye.2497@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.nazarewicz@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®