lkml.org 
[lkml]   [2010]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] epoll: use wrapper functions
On Fri, May 7, 2010 at 2:51 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> 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.
>
>

I greped all the code, and found that
add_wait_queue_head_exclusive_locked() and remove_wait_queue_locked()
aren't used. It seems that no users like these APIs. So I will remove
these two APIs, and add __add_wait_queue_excl() instead. Thanks.


--
Regards,
Changli Gao(xiaosuo@gmail.com)
--
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/

\
 
 \ /
  Last update: 2010-05-07 04:51    [W:2.440 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site