public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org,
	raistlin@linux.it, juri.lelli@gmail.com,
	clark.williams@gmail.com, mingo@redhat.com, rostedt@goodmis.org
Subject: Re: [PATCH 1/3] sched: Move the priority specific bits into a new header file.
Date: Mon, 10 Feb 2014 10:56:34 +0800	[thread overview]
Message-ID: <52F83FE2.90004@cn.fujitsu.com> (raw)
In-Reply-To: <87fvo75pci.fsf@sejong.aot.lge.com>


Hi Namhyung,

On 01/29/2014 01:28 PM, Namhyung Kim wrote:
> Hi Dongsheng,
>
> On Mon, 27 Jan 2014 17:15:37 -0500, Dongsheng Yang wrote:
>> Some bits about priority are defined in linux/sched/rt.h, but
>> some of them are not only for rt scheduler, such as MAX_PRIO.
>>
>> This patch move them all into a new header file, linux/sched/prio.h.
>>
>> Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
>> ---
>>   include/linux/sched.h      |  4 ++++
>>   include/linux/sched/prio.h | 23 +++++++++++++++++++++++
>>   include/linux/sched/rt.h   | 21 +++------------------
>>   3 files changed, 30 insertions(+), 18 deletions(-)
>>   create mode 100644 include/linux/sched/prio.h
>>
>> diff --git a/include/linux/sched.h b/include/linux/sched.h
>> index 68a0e84..ba1b732 100644
>> --- a/include/linux/sched.h
>> +++ b/include/linux/sched.h
>> @@ -3,6 +3,10 @@
>>   
>>   #include <uapi/linux/sched.h>
>>   
>> +#ifndef _SCHED_PRIO_H
>> +#include <linux/sched/prio.h>
>> +#endif /* #ifndef _SCHED_PRIO_H */
> It seems you don't need to use #ifndef-#endif pair to include a header
> file?

Sorry for the late reply, coming back from vacation for Chinese Spring 
Festival.

The reason I use #ifndef-#endif here is that there are lots of files,
  such as kernel/sched/sched.h, are including <linux/sched.h> and
<linux/sched/rt.h>. And both of them are including prio.h.

I am not sure should we avoid reincluding a file and how.

Could you help to give me some suggestion of it. Thanx :)

> Thanks,
> Namhyung
>


  reply	other threads:[~2014-02-10  2:56 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-22 22:41 [PATCH] tracing: Use task_nice() in function __update_max_tr() to get the nice value of task Dongsheng Yang
2014-01-23  3:56 ` Steven Rostedt
2014-01-23  4:00   ` Steven Rostedt
2014-01-23 17:11     ` Dongsheng Yang
2014-01-23  8:26       ` Peter Zijlstra
2014-01-23 11:52         ` Steven Rostedt
2014-01-27 22:15           ` [PATCH 0/3] sched: Collect the bits about priority into a new header file, include/linux/sched/prio.h Dongsheng Yang
2014-01-27 15:45             ` Steven Rostedt
     [not found]               ` <CA+qeAOqW58894hGvCP0N0E-EUESfFPeqMmXUuhqxEZrRjDV97A@mail.gmail.com>
2014-01-28 16:06                 ` Steven Rostedt
2014-01-27 22:15             ` [PATCH 1/3] sched: Move the priority specific bits into a new header file Dongsheng Yang
2014-01-29  5:28               ` Namhyung Kim
2014-02-10  2:56                 ` Dongsheng Yang [this message]
2014-02-10 14:09                   ` Steven Rostedt
2014-02-11  1:10                     ` Dongsheng Yang
2014-02-10 13:30               ` [tip:sched/core] " tip-bot for Dongsheng Yang
2014-01-27 22:15             ` [PATCH 2/3] sched: Expose some macros related with priority Dongsheng Yang
2014-02-10 13:30               ` [tip:sched/core] sched: Expose some macros related to priority tip-bot for Dongsheng Yang
2014-01-27 22:15             ` [PATCH 3/3] sched: Implement task_nice and task_prio as static inline functions Dongsheng Yang
2014-01-27 10:32               ` Peter Zijlstra
2014-01-28  1:09                 ` Dongsheng Yang
2014-01-27 12:16                   ` Peter Zijlstra
2014-01-28  1:59                     ` Dongsheng Yang
2014-01-27 13:08                       ` Peter Zijlstra
2014-01-28  3:00                         ` [PATCH 3/3 V2] sched: Implement task_nice as static inline function Dongsheng Yang
2014-01-28  3:27                           ` Dongsheng Yang
2014-02-10 13:32                           ` [tip:sched/core] sched: Implement task_nice() " tip-bot for Dongsheng Yang
2014-01-23 21:43         ` [PATCH] tracing: Use task_nice() in function __update_max_tr() to get the nice value of task Dongsheng Yang
2014-02-11  3:19 ` Dongsheng Yang
  -- strict thread matches above, loose matches on Subject: below --
2014-02-10  9:05 [PATCH 0/3 V2] sched: Collect the bits about priority into a new header file, include/linux/sched/prio.h Dongsheng Yang
2014-02-10  9:05 ` [PATCH 1/3] sched: Move the priority specific bits into a new header file Dongsheng Yang

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=52F83FE2.90004@cn.fujitsu.com \
    --to=yangds.fnst@cn.fujitsu.com \
    --cc=clark.williams@gmail.com \
    --cc=juri.lelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=raistlin@linux.it \
    --cc=rostedt@goodmis.org \
    /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