lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 06 May 2010 20:51:03 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Davide Libenzi <davidel@...ilserver.org>
Cc:	Changli Gao <xiaosuo@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Roland Dreier <rolandd@...co.com>,
	Stefan Richter <stefanr@...6.in-berlin.de>,
	Ingo Molnar <mingo@...e.hu>, Takashi Iwai <tiwai@...e.de>,
	David Howells <dhowells@...hat.com>,
	linux-fsdevel@...r.kernel.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] epoll: use wrapper functions

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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ