lkml.org 
[lkml]   [2004]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Add missing refrigerator support.
From
Date
Hi.

On Thu, 2004-07-29 at 07:25, Andrew Morton wrote:
> Nigel Cunningham <ncunningham@linuxmail.org> wrote:
> >
> > + if (current->flags & PF_FREEZE) {
> > + refrigerator(PF_FREEZE);
> > + continue;
> > + }
>
> This seems excessively verbose. Why not do:
>
> if (try_to_freeze())
> continue;
>
>
> /*
> * Comment goes here
> */
> static inline int try_to_freeze(void)
> {
> /* I think the compiler propagates likeliness to the inline's caller */
> if (unlikely(current->flags & PF_FREEZE)) {
> refrigerator(PF_FREEZE);
> return 1;
> }
> return 0;
> }

Probably because I haven't seen that macro before. Looks good. I'll make
use of it and add it to suspend2 too, so that whenever we get the merge
done, it doesn't disappear.

Regards.

Nigel

-
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 14:04    [W:0.082 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site