lkml.org 
[lkml]   [2011]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/6] freezer: kill unused set_freezable_with_signal()
Hello,

On Tue, Sep 06, 2011 at 05:25:39PM +0200, Oleg Nesterov wrote:
> On 09/06, Oleg Nesterov wrote:
> >
> > Yes, agreed. In this case I think it should be
> >
> > #define wait_event_freezable(wq, condition) \
> > ({ \
> > int __retval; \
> > for (;;) { \
> > __retval = wait_event_interruptible(wq, \
> > (condition) || freezing(current)); \
> > if (__retval || (condition)) \
> > break; \
> > try_to_freeze(); \
> > } \
> > __retval; \
> > })
> >
> > __retval/ERESTARTSYS is only needed for kthreads which play with allow_signal(),
> > probably nobody should do this.
>
> I meant, unless the caller plays with allow_signal(), it has all rights to do
>
> if (wait_event_freezable(...))
> BUG();
>
> This becomes correct with the code above.

Yeap, sure, w/ freezable_with_signal gone, the above should work fine.
Care to create a patch?

Thanks.

--
tejun


\
 
 \ /
  Last update: 2011-09-06 17:55    [W:0.047 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site