linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Changli Gao <xiaosuo@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Roland Dreier <rolandd@cisco.com>,
	Stefan Richter <stefanr@s5r6.in-berlin.de>,
	Ingo Molnar <mingo@elte.hu>, Takashi Iwai <tiwai@suse.de>,
	David Howells <dhowells@redhat.com>,
	linux-fsdevel@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] epoll: use wrapper functions
Date: Thu, 06 May 2010 20:51:03 +0200	[thread overview]
Message-ID: <1273171863.1642.258.camel@laptop> (raw)
In-Reply-To: <alpine.DEB.2.00.1005061140100.2642@makko.or.mcafeemobile.com>

On Thu, 2010-05-06 at 11:47 -0700, Davide Libenzi wrote:
> Since we already have __add_wait_queue(), __add_wait_queue_tail() and 
> __remove_wait_queue() (which all means "locked"), and while I agree in 
> having the exclusive-add wrapped into a function, I much better prefer a:
> 
> static inline void __add_wait_queue_excl(wait_queue_head_t *head, 
>                                          wait_queue_t *new)
> {
>         new->flags |= WQ_FLAG_EXCLUSIVE;
>         __add_wait_queue(head, new);
> }
> 
> The patch you posted introduces a different naming, which leaves all the 
> other __*() untouched, and wraps the already one-liner __remove_wait_queue() 
> with yet another one-liner. 

I concur, I always get confused by the _locked postfix (and its more
typing). Also, it goes against the lock data not code paradigm.


  reply	other threads:[~2010-05-06 18:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-06  1:57 [PATCH] epoll: use wrapper functions Changli Gao
2010-05-06 18:47 ` Davide Libenzi
2010-05-06 18:51   ` Peter Zijlstra [this message]
2010-05-07  2:48     ` Changli Gao

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=1273171863.1642.258.camel@laptop \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=davidel@xmailserver.org \
    --cc=dhowells@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rolandd@cisco.com \
    --cc=stefanr@s5r6.in-berlin.de \
    --cc=tiwai@suse.de \
    --cc=viro@zeniv.linux.org.uk \
    --cc=xiaosuo@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).