public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: balbi@ti.com
Cc: David Cohen <dacohen@gmail.com>,
	linux-kernel@vger.kernel.org, mingo@elte.hu,
	linux-omap@vger.kernel.org, linux-media@vger.kernel.org,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Oleg Nesterov <oleg@redhat.com>
Subject: Re: [PATCH v2 1/1] headers: fix circular dependency between linux/sched.h and linux/wait.h
Date: Mon, 21 Feb 2011 18:06:02 +0100	[thread overview]
Message-ID: <1298307962.24121.27.camel@twins> (raw)
In-Reply-To: <20110221165443.GL23087@legolas.emea.dhcp.ti.com>

On Mon, 2011-02-21 at 18:54 +0200, Felipe Balbi wrote:

> What you seem to have missed is that sched.h doesn't include wait.h, it
> includes completion.h and completion.h needs wait.h due the
> wait_queue_head_t it uses.

Yeah, so? sched.h doesn't need completion.h, but like with wait.h I'd
argue the other way around, completion.h would want to include sched.h

> If someone finds a cleaner way to drop that need, then I'm all for it as
> my original suggestion to the original patch was to include sched.h in
> wait.h, but it turned out that it's not possible due to the reasons
> already explained.

Feh,. I'm saying the proposed solution stinks and if you want to make
things better you need to work on fixing whatever is in the way of
including sched.h from wait.h.

1) remove the inclusion of completion.h -- easy we can live with an
incomplete type.

2) move the other wait_queue_head_t users (signal_struct sighand_struct)
out of sched.h

3) ...

4) profit!

Just isolating the TASK_state bits isn't going to be enough, wait.h also
wants wake_up goo and schedule*(), therefore either include sched.h from
whatever .c file you're using wait.h bits or do the above cleanup.




  reply	other threads:[~2011-02-21 17:06 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
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 [this message]
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=1298307962.24121.27.camel@twins \
    --to=peterz@infradead.org \
    --cc=adobriyan@gmail.com \
    --cc=balbi@ti.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 \
    --cc=oleg@redhat.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