From: Con Kolivas <kernel@kolivas.org>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu
Subject: Re: [PATCH 1/5] sched-cleanup_task_activated.patch
Date: Fri, 13 Jan 2006 21:44:41 +1100 [thread overview]
Message-ID: <200601132144.41524.kernel@kolivas.org> (raw)
In-Reply-To: <20060113022819.432a1b6d.akpm@osdl.org>
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
prev parent reply other threads:[~2006-01-13 10:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-13 10:22 [PATCH 1/5] sched-cleanup_task_activated.patch Con Kolivas
2006-01-13 10:28 ` Andrew Morton
2006-01-13 10:44 ` Con Kolivas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200601132144.41524.kernel@kolivas.org \
--to=kernel@kolivas.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.