Messages in this thread | | | Date | Wed, 28 Jul 2004 14:25:34 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] Add missing refrigerator support. |
| |
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; }
- 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/
| |