lkml.org 
[lkml]   [2002]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [QUESTION] How to use interruptible_sleep_on() without races ?
From
On Fri, Apr 05, 2002 at 04:20:04AM +0100, Alan Cox wrote:
> >
> > I looked at it in every possible way, and I don't see how it
> > is possible to use safely interruptible_sleep_on(). And I wonder :
>
> It isnt for interrupt stuff - its going back to the old kernel behaviour
> when it used to be usable

So, maybe it would be a nice idea to remove it from the 2.5.X
kernel to force a "spring cleanup" of the old code. If it's no longer
usable and only confusing, it should be purged...

> Actually the code it uses is clean, slightly verbose but clean. It puts
> the phases in the right order and that fixes the race cleanly. You
> could just use completions in that case or you could use
>
> wait_event_interruptible(&my_wait_queue, my_condition==FALSE)
>
> which is a macro that generates the right stuff.

And it might even want to be defined in include/linux/sched.h
as a replacement for interruptible_sleep_on(). It seems like a generic
need, and I would feel much safer if one of the guru wrote it properly
for me ;-)

> Alan

Regards,

Jean
-
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: 2005-03-22 13:22    [W:0.111 / U:4.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site