From: Peter Zijlstra <peterz@infradead.org>
To: NeilBrown <neilb@suse.de>
Cc: Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org, NFS <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH/RFC] SCHED: allow wait_on_bit functions to support a timeout.
Date: Wed, 30 Apr 2014 09:31:54 +0200 [thread overview]
Message-ID: <20140430073154.GW11096@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20140430122926.6bb0c771@notabene.brown>
On Wed, Apr 30, 2014 at 12:29:26PM +1000, NeilBrown wrote:
> If you think it is a good cleanup I'll post a proper patch with all the right
> Cc:s.
Yeah, its a good cleanup. Thanks!
> +static inline int
> +wait_on_bit(void *word, int bit, unsigned mode)
> +{
> + if (!test_bit(bit, word))
> + return 0;
> + return out_of_line_wait_on_bit(word, bit,
> + bit_wait,
> + mode & 65535);
> +}
> +
> +static inline int
> +wait_on_bit_io(void *word, int bit, unsigned mode)
> +{
> + if (!test_bit(bit, word))
> + return 0;
> + return out_of_line_wait_on_bit(word, bit,
> + bit_wait_io,
> + mode & 65535);
> +}
That actually fits on one <80 line. Also, where does the 16 bit mask
come from? On which, I would write that in hex, 0xFFFF is slightly
easier to recognise as (1<<16)-1.
next prev parent reply other threads:[~2014-04-30 7:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-29 9:44 NeilBrown
2014-04-29 10:32 ` Peter Zijlstra
2014-04-29 13:00 ` NeilBrown
2014-04-30 2:29 ` NeilBrown
2014-04-30 7:31 ` Peter Zijlstra [this message]
2014-04-30 7:38 ` Peter Zijlstra
2014-04-30 7:52 ` NeilBrown
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=20140430073154.GW11096@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=neilb@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome