lkml.org 
[lkml]   [2014]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH/RFC] SCHED: allow wait_on_bit functions to support a timeout.
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.


\
 
 \ /
  Last update: 2014-04-30 10:01    [W:0.063 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site