lkml.org 
[lkml]   [2010]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH][RFC] time: add wait_interruptible_timeout macro to sleep (w. timeout) until wake_up
From
Date
On Sat, 2010-02-27 at 10:33 +0100, Rafał Miłecki wrote: 
> W dniu 26 lutego 2010 20:01 użytkownik Ville Syrjälä <syrjala@sci.fi> napisał:
> > Disabling the condition check doesn't make sense.
> >
> > You could use a completion.
> >
> > init_completion(vbl_irq);
> > enable_vbl_irq();
> > wait_for_completion(vbl_irq);
> > disable_vbl_irq();
> > and call complete(vbl_irq) in the interrupt handler.
> >
> > The same would of course work with just some flag or counter
> > and a wait queue.
>
> Ouch, I can see it gone bad already.
>
> Firstly I simply just wanted to avoid condition in wait_event_*. It
> looked unnecessary as I got interrupts (signals).

So this code runs in user process context? If so, it should return to
userspace ASAP on signal receipt, otherwise e.g. smoothness of X mouse
movement may suffer.

If that's a problem, then maybe the code should run in a different
context, e.g. a tasklet or some kind of worker kernel thread.


--
Earthling Michel Dänzer | http://www.vmware.com
Libre software enthusiast | Debian, X and DRI developer
--
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-03-01 17:47    [W:0.072 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site