* [PATCH] tools lib traceevent: Modify header to work in C++ programs
@ 2012-08-21 23:13 Steven Rostedt
2012-08-22 6:47 ` Namhyung Kim
0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2012-08-21 23:13 UTC (permalink / raw)
To: LKML; +Cc: Ingo Molnar, Arnaldo Carvalho de Melo, Arjan van de Ven
Arnaldo,
As the libtraceevent library is also used by powertop, and that is
written in *cough* C++ *cough*, we need to make sure that the headers do
not have any C++ reserved words. Please apply this patch. Thanks.
-- Steve
Steven Rostedt (1):
tools lib traceevent: Modify header to work in C++ programs
----
tools/lib/traceevent/event-parse.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---------------------------
commit 79f481dbd7cb14e33113180b74e09e742cd839f9
Author: Steven Rostedt <srostedt@redhat.com>
Date: Sat May 7 19:04:01 2011 -0400
tools lib traceevent: Modify header to work in C++ programs
Replace keyword "private" from event-parse.h to allow it to be
used in C++ programs.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
index 5772ad8..c28713b 100644
--- a/tools/lib/traceevent/event-parse.h
+++ b/tools/lib/traceevent/event-parse.h
@@ -49,7 +49,7 @@ struct pevent_record {
int cpu;
int ref_count;
int locked; /* Do not free, even if ref_count is zero */
- void *private;
+ void *r_private;
#if DEBUG_RECORD
struct pevent_record *prev;
struct pevent_record *next;
@@ -106,7 +106,7 @@ struct plugin_option {
char *plugin_alias;
char *description;
char *value;
- void *private;
+ void *p_private;
int set;
};
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tools lib traceevent: Modify header to work in C++ programs
2012-08-21 23:13 [PATCH] tools lib traceevent: Modify header to work in C++ programs Steven Rostedt
@ 2012-08-22 6:47 ` Namhyung Kim
2012-08-23 15:17 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Namhyung Kim @ 2012-08-22 6:47 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, Ingo Molnar, Arnaldo Carvalho de Melo, Arjan van de Ven
Hi, Steve
On Tue, 21 Aug 2012 19:13:20 -0400, Steven Rostedt wrote:
> tools lib traceevent: Modify header to work in C++ programs
>
> Replace keyword "private" from event-parse.h to allow it to be
> used in C++ programs.
>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
>
> diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
> index 5772ad8..c28713b 100644
> --- a/tools/lib/traceevent/event-parse.h
> +++ b/tools/lib/traceevent/event-parse.h
> @@ -49,7 +49,7 @@ struct pevent_record {
> int cpu;
> int ref_count;
> int locked; /* Do not free, even if ref_count is zero */
> - void *private;
> + void *r_private;
This r_ (and p_) prefix make it inconsistent with others. How about
simply using 'priv' instead?
Thanks,
Namhyung
> #if DEBUG_RECORD
> struct pevent_record *prev;
> struct pevent_record *next;
> @@ -106,7 +106,7 @@ struct plugin_option {
> char *plugin_alias;
> char *description;
> char *value;
> - void *private;
> + void *p_private;
> int set;
> };
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tools lib traceevent: Modify header to work in C++ programs
2012-08-22 6:47 ` Namhyung Kim
@ 2012-08-23 15:17 ` Steven Rostedt
0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2012-08-23 15:17 UTC (permalink / raw)
To: Namhyung Kim
Cc: LKML, Ingo Molnar, Arnaldo Carvalho de Melo, Arjan van de Ven
On Wed, 2012-08-22 at 15:47 +0900, Namhyung Kim wrote:
> Hi, Steve
>
> On Tue, 21 Aug 2012 19:13:20 -0400, Steven Rostedt wrote:
> > tools lib traceevent: Modify header to work in C++ programs
> >
> > Replace keyword "private" from event-parse.h to allow it to be
> > used in C++ programs.
> >
> > Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> >
> > diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
> > index 5772ad8..c28713b 100644
> > --- a/tools/lib/traceevent/event-parse.h
> > +++ b/tools/lib/traceevent/event-parse.h
> > @@ -49,7 +49,7 @@ struct pevent_record {
> > int cpu;
> > int ref_count;
> > int locked; /* Do not free, even if ref_count is zero */
> > - void *private;
> > + void *r_private;
>
> This r_ (and p_) prefix make it inconsistent with others. How about
> simply using 'priv' instead?
Sure, sounds good.
I'll update and resend.
Thanks!
-- Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-08-23 15:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-21 23:13 [PATCH] tools lib traceevent: Modify header to work in C++ programs Steven Rostedt
2012-08-22 6:47 ` Namhyung Kim
2012-08-23 15:17 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).