All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: David Cohen <dacohen@gmail.com>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu,
	linux-omap@vger.kernel.org, linux-media@vger.kernel.org,
	Alexey Dobriyan <adobriyan@gmail.com>
Subject: Re: [PATCH v2 1/1] headers: fix circular dependency between linux/sched.h and linux/wait.h
Date: Mon, 21 Feb 2011 16:54:37 +0100	[thread overview]
Message-ID: <1298303677.24121.1.camel@twins> (raw)
In-Reply-To: <1298299131-17695-2-git-send-email-dacohen@gmail.com>

On Mon, 2011-02-21 at 16:38 +0200, David Cohen wrote:
> Currently sched.h and wait.h have circular dependency between both.
> wait.h defines macros wake_up*() which use macros TASK_* defined by
> sched.h. But as sched.h indirectly includes wait.h, such wait.h header
> file can't include sched.h too. The side effect is when some file
> includes wait.h and tries to use its wake_up*() macros, it's necessary
> to include sched.h also.
> This patch moves all TASK_* macros from linux/sched.h to a new header
> file linux/task_state.h. This way, both sched.h and wait.h can include
> task_state.h and fix the circular dependency. No need to include sched.h
> anymore when wake_up*() macros are used. 

I think Alexey already told you what you done wrong.

Also, I really don't like the task_state.h header, it assumes a lot of
things it doesn't include itself and only works because its using macros
and not inlines at it probably should.

  reply	other threads:[~2011-02-21 15:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-21 14:38 [PATCH v2 0/1] Fix linux/wait.h header file David Cohen
2011-02-21 14:38 ` [PATCH v2 1/1] headers: fix circular dependency between linux/sched.h and linux/wait.h David Cohen
2011-02-21 15:54   ` Peter Zijlstra [this message]
2011-02-21 16:03     ` David Cohen
2011-02-21 16:20       ` Peter Zijlstra
2011-02-21 16:29         ` Felipe Balbi
2011-02-21 16:43           ` Peter Zijlstra
2011-02-21 16:54             ` Felipe Balbi
2011-02-21 17:06               ` Peter Zijlstra
2011-02-21 17:18                 ` Felipe Balbi
2011-02-21 19:21                 ` Alexey Dobriyan
2011-02-21 17:21         ` Oleg Nesterov
2011-02-21 17:27           ` Oleg Nesterov
2011-02-22 15:38             ` David Cohen
2011-02-21 16:33 ` [PATCH v2 0/1] Fix linux/wait.h header file Randy Dunlap

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=1298303677.24121.1.camel@twins \
    --to=peterz@infradead.org \
    --cc=adobriyan@gmail.com \
    --cc=dacohen@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.