All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: NeilBrown <neilb@suse.de>
Cc: Ingo Molnar <mingo@redhat.com>,
	Trond Myklebust <trond.myklebust@primarydata.com>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] SCHED: allow wait_on_bit_action functions to support a timeout.
Date: Thu, 1 May 2014 10:04:30 +0200	[thread overview]
Message-ID: <20140501080430.GL11096@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20140501124143.5712eb96@notabene.brown>

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?

  reply	other threads:[~2014-05-01  8:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-01  2:41 [PATCH] SCHED: allow wait_on_bit_action functions to support a timeout NeilBrown
2014-05-01  8:04 ` Peter Zijlstra [this message]
2014-05-01  9:35   ` NeilBrown
2014-05-19 13:08 ` [tip:sched/core] sched: Allow " tip-bot for 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=20140501080430.GL11096@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bfields@fieldses.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=neilb@suse.de \
    --cc=trond.myklebust@primarydata.com \
    /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.