lkml.org 
[lkml]   [2002]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux Trace Toolkit ready for 2.5
Karim Yaghmour wrote:
>
> I have prepared a 2.5.7 patch for the Linux Trace Toolkit.
>
> #define TRACE_SCHEDCHANGE(OUT, IN) \
> do \
> {\
> trace_schedchange sched_event;\
> sched_event.out = OUT->pid;\
> sched_event.in = (uint32_t) IN;\
> sched_event.out_state = OUT->state; \
> trace_event(TRACE_EV_SCHEDCHANGE, &sched_event);\
> } while(0);

The macro body should not have the terminating semicolon. This is
the whole point of this trick, allowing it to be used safely in if
statements like a function.

--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:25    [W:0.075 / U:1.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site