mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dean Nelson <dcn@sgi.com>
To: Chris Wedgwood <cw@f00f.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] add wait_event_interruptible_exclusive() macro
Date: Tue, 22 Jun 2004 07:27:57 -0500	[thread overview]
Message-ID: <20040622122757.GA23606@sgi.com> (raw)
In-Reply-To: <20040622120130.GA16246@taniwha.stupidest.org>

On Tue, Jun 22, 2004 at 05:01:30AM -0700, Chris Wedgwood wrote:
> On Fri, Jun 18, 2004 at 10:12:06AM -0500, Dean Nelson wrote:
> 
> > +#define __wait_event_interruptible_exclusive(wq, condition, ret)	\
> > +do {									\
> > +	wait_queue_t __wait;						\
> > +	init_waitqueue_entry(&__wait, current);				\
> > +									\
> > +	add_wait_queue_exclusive(&wq, &__wait);
> > \
> 
> [...]
> 
> Thsi reminds me...
> 
> I really loath all the preprocessor macros.  I know there are plenty
> of this already, but I don't see the advantage of macros over (static)
> inline functions which IMO look cleaner and give gcc some change to
> sanitize what it's looking at without actually having to have it used.
> 
> Is there a reason why we keep doing this?

In this particular case, I was just trying to 'conform' to what I found
in include/linux/wait.h.

If the community would prefer, I can resubmit my patch as an inline
function instead of a macro.

Dean

  reply	other threads:[~2004-06-22 12:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-18 15:12 Dean Nelson
2004-06-22 12:01 ` Chris Wedgwood
2004-06-22 12:27   ` Dean Nelson [this message]
2004-06-22 12:29   ` Christoph Hellwig
2004-06-22 13:35     ` Paul Jackson
2004-06-22 14:35       ` Christoph Hellwig

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=20040622122757.GA23606@sgi.com \
    --to=dcn@sgi.com \
    --cc=cw@f00f.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®