Re: [PATCH] SCHED: allow wait_on_bit_action functions to support a timeout.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux