lkml.org 
[lkml]   [2009]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 2/6] epoll keyed wakeups v2 - introduce new *_poll() wakeup macros
On Tue, 3 Feb 2009, Linus Torvalds wrote:

>
>
> On Tue, 3 Feb 2009, Andrew Morton wrote:
> > >
> > > Actually reading the comments helps :) It triggers an include-hell, if you
> > > make them inline. Since they're lockdep debug thingies, I think it's kinda
> > > wasted turn them into non-inline real functions, so they'd better remain
> > > macros IMO.
> >
> > ho hum. I think it'd be worth at least renaming the arguments to
> > something less daft, for readability reasons.
>
> Also, maybe we can make it an out-of-line thing rather than an inline?
>
> Why not just make it
>
> extern void wake_up_nested[_poll](wait_queue_head_t *,
> [unsigned long pollflags, ] unsigned int nesting);
>
> and then just move it out of a header file entirely by writing it as a
> real function in some *.c file that only gets compiled with
> DEBUG_LOCK_ALLOC.
>
> Hmm? No include hell.

There's another thing. Epoll is the *only* user of such thing. I could
suck it in there if you prefer. wake_up_nested(), once
wake_up_nested_poll() goes in, has no more users and IMO can go.
Otherwise yes, we could define:

void wake_up_nested_poll(wait_queue_head_t *q, unsigned long events,
int subclass);

in wait.h, and define it under DEBUG_LOCK_ALLOC in sched.c.
Let me know what you'd like best ...



- Davide




\
 
 \ /
  Last update: 2009-02-03 21:37    [W:0.087 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site