public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Theodore Tso <tytso@MIT.EDU>
Cc: viresh kumar <viresh.linux@gmail.com>,
	Borislav Petkov <petkovbb@googlemail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: QUERY: Inclusion of header files in kernel header files
Date: Wed, 24 Feb 2010 11:38:22 +0100	[thread overview]
Message-ID: <4B85019E.9040708@ladisch.de> (raw)
In-Reply-To: <07BBC9AE-C1A1-449F-AE5E-EB5B1C6323C2@mit.edu>

Theodore Tso wrote:
> Also, it's highly desirable that as much as possible multiple
> inclusion is fixed up at the same time you add extra #includes into
> header files.   Protecting against multiple inclusion is critical,
> yes, but even with the protection against multiple inclusion, the
> header file has to get parsed a second time, and that slows down
> kernel compiles.

Multiple inclusion of a protected header does not hurt at all; gcc
detects that a header file uses #ifdef/#endif header guards and
automatically ignores any #include for that file if the symbol is
already defined.


Regards,
Clemens

      parent reply	other threads:[~2010-02-24 10:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <22dbbef21002222241h711402f1me6b60ac7502cccd4@mail.gmail.com>
2010-02-23  6:43 ` QUERY: Inclusion of header files in kernel header files viresh kumar
2010-02-23  6:59   ` Borislav Petkov
2010-02-23  7:31     ` viresh kumar
2010-02-23  9:50       ` Borislav Petkov
2010-02-23 11:37         ` viresh kumar
2010-02-23 13:01           ` Borislav Petkov
2010-02-23 13:59             ` Stefan Richter
2010-02-24  4:23             ` viresh kumar
2010-02-23 15:15           ` Theodore Tso
2010-02-24  4:28             ` viresh kumar
2010-02-24  7:02               ` Theodore Tso
2010-02-24 10:38             ` Clemens Ladisch [this message]

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=4B85019E.9040708@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petkovbb@googlemail.com \
    --cc=tytso@MIT.EDU \
    --cc=viresh.linux@gmail.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