Eyal Lebedinsky wrote:
> > #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.
True. Although those trace statements have never been called upon to
be in if statements, your observation is correct. Thanks.
Karim
===================================================
Karim Yaghmour
karym@opersys.com
Embedded and Real-Time Linux Expert
===================================================
-
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/
This archive was generated by hypermail 2b29 : Mon Apr 15 2002 - 22:00:21 EST