All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karim Yaghmour <karym@opersys.com>
To: Eyal Lebedinsky <eyal@eyal.emu.id.au>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Linux Trace Toolkit ready for 2.5
Date: Fri, 12 Apr 2002 20:31:47 -0400	[thread overview]
Message-ID: <3CB77C73.3981374@opersys.com> (raw)
In-Reply-To: <3CB61523.89BE3422@opersys.com> <3CB76113.ABEAA49E@eyal.emu.id.au>


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
===================================================

      reply	other threads:[~2002-04-13  0:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-11 22:58 Linux Trace Toolkit ready for 2.5 Karim Yaghmour
2002-04-12 22:34 ` Eyal Lebedinsky
2002-04-13  0:31   ` Karim Yaghmour [this message]

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=3CB77C73.3981374@opersys.com \
    --to=karym@opersys.com \
    --cc=eyal@eyal.emu.id.au \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.