mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Zoltan Kiss <zoltan.kiss@citrix.com>
Cc: Rob Landley <rob@landley.net>, Jiri Kosina <jkosina@suse.cz>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Paul Bolle <pebolle@tiscali.nl>, <linux-doc@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Documentation/trace: Correcting and extending tracepoint documentation
Date: Mon, 2 Sep 2013 13:33:45 -0400	[thread overview]
Message-ID: <20130902133345.1cddd3f1@gandalf.local.home> (raw)
In-Reply-To: <5224C4B7.6090003@citrix.com>

On Mon, 2 Sep 2013 18:02:47 +0100
Zoltan Kiss <zoltan.kiss@citrix.com> wrote:


> > Why? (Both why do you need to #include a header outside a multiple
> > inclusion guard, and why is the additional header needed at all in
> > _every_ subsystem trace header?)
> I see only one inclusion guard here, the one above. define_trace.h 
> should take effect at only one place, where CREATE_TRACE_POINTS is 
> defined, to create the tracepoints exactly once. However I don't see as 
> well why it should be outside protection. Maybe because the intentional 
> header reinclusion in it?

Because if it was inside the protection you can miss the
CREATE_TRACE_POINTS define. These headers can be included by other
headers (although they probably shouldn't be). But that's the point of
the protection isn't it? In case multiple headers include the file?

Anyway, lets say the header was include earlier, thus you can have this:


#include <trace/foo.h> // include by another header

#define CREATE_TRACE_POINTS

#include <trace/foo.h>


Now if the include of define_trace.h was inside the protection, it will
not get included again, and no trace points would be created.

-- Steve

  reply	other threads:[~2013-09-02 17:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-22 21:49 Zoltan Kiss
2013-08-24 18:53 ` Mathieu Desnoyers
2013-08-27  8:57   ` Jiri Kosina
2013-08-25  8:59 ` Rob Landley
2013-09-02 17:02   ` Zoltan Kiss
2013-09-02 17:33     ` Steven Rostedt [this message]
2014-11-07  2:44     ` Steven Rostedt

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=20130902133345.1cddd3f1@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=jkosina@suse.cz \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=pebolle@tiscali.nl \
    --cc=rob@landley.net \
    --cc=zoltan.kiss@citrix.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®