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/
This archive was generated by hypermail 2b29 : Mon Apr 15 2002 - 22:00:21 EST