lkml.org 
[lkml]   [2006]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/5] sched-cleanup_task_activated.patch
Date
On Friday 13 January 2006 21:28, Andrew Morton wrote:
> Con Kolivas <kernel@kolivas.org> wrote:
> > +enum sleep_type {
> > + SLEEP_NORMAL,
> > + SLEEP_NONINTERACTIVE,
> > + SLEEP_INTERACTIVE,
> > + SLEEP_INTERRUPTED,
> > +};
>
> If you make these 1, 2, 4 and 8
>
> > +static inline int interactive_sleep(enum sleep_type sleep_type)
> > +{
> > + return (sleep_type == SLEEP_INTERACTIVE ||
> > + sleep_type == SLEEP_INTERRUPTED);
> > +}
>
> then this can be
>
> return sleep_type & (SLEEP_INTERACTIVE|SLEEP_INTERRUPTED);
>
> which would save, oh, about nothing.

Hah yeah I went for readability over one cycle. Change it if you care; I don't
mind :).

Cheers,
Con
-
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: 2006-01-13 11:47    [W:0.032 / U:0.944 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site