lkml.org 
[lkml]   [2014]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] SCHED: allow wait_on_bit_action functions to support a timeout.
On Thu, May 01, 2014 at 12:41:43PM +1000, NeilBrown wrote:
> diff --git a/include/linux/wait.h b/include/linux/wait.h
> index 438dc6044587..162cbcde9dae 100644
> --- a/include/linux/wait.h
> +++ b/include/linux/wait.h
> @@ -25,6 +25,7 @@ struct wait_bit_key {
> void *flags;
> int bit_nr;
> #define WAIT_ATOMIC_T_BIT_NR -1
> + unsigned long private;
> };
>
> struct wait_bit_queue {
> @@ -147,12 +148,12 @@ void __wake_up_sync_key(wait_queue_head_t *q, unsigned int mode, int nr, void *k
> void __wake_up_locked(wait_queue_head_t *q, unsigned int mode, int nr);
> void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr);
> void __wake_up_bit(wait_queue_head_t *, void *, int);
> -int __wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned);
> -int __wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned);
> +int __wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(struct wait_bit_key *), unsigned);
> +int __wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, int (*)(struct wait_bit_key *), unsigned);


Would something like:

typedef int (*wait_bit_action_f)(struct wait_bit_key *);

make sense?


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