linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Shaohua Li <shli@kernel.org>, NeilBrown <neilb@suse.de>,
	Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: linux-next: manual merge of the tip tree
Date: Wed, 16 Oct 2013 20:51:39 +0200	[thread overview]
Message-ID: <1381949500-501-2-git-send-email-treding@nvidia.com> (raw)
In-Reply-To: <1381949500-501-1-git-send-email-treding@nvidia.com>

Today's linux-next merge of the tip tree got a conflict in

	include/linux/wait.h

caused by commits 1ab2460 (wait: add wait_event_cmd()) and fb869b6
(sched/wait: Clean up wait.h details a bit).

I've cleaned it up (see below). Please verify that the resolution looks
good.

Thanks,
Thierry
---
diff --cc include/linux/wait.h
index d9eff54,a2726c7..0395985
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@@ -253,59 -275,9 +275,45 @@@ do {									
  	__ret;								\
  })
  
 +#define __wait_event_cmd(wq, condition, cmd1, cmd2)			\
 +do {									\
 +	DEFINE_WAIT(__wait);						\
 +									\
 +	for (;;) {							\
 +		prepare_to_wait(&wq, &__wait, TASK_UNINTERRUPTIBLE);	\
 +		if (condition)						\
 +			break;						\
 +		cmd1;							\
 +		schedule();						\
 +		cmd2;							\
 +	}								\
 +	finish_wait(&wq, &__wait);					\
 +} while (0)
 +
 +/**
 + * wait_event_cmd - sleep until a condition gets true
 + * @wq: the waitqueue to wait on
 + * @condition: a C expression for the event to wait for
 + * cmd1: the command will be executed before sleep
 + * cmd2: the command will be executed after sleep
 + *
 + * The process is put to sleep (TASK_UNINTERRUPTIBLE) until the
 + * @condition evaluates to true. The @condition is checked each time
 + * the waitqueue @wq is woken up.
 + *
 + * wake_up() has to be called after changing any variable that could
 + * change the result of the wait condition.
 + */
 +#define wait_event_cmd(wq, condition, cmd1, cmd2)			\
 +do {									\
 +	if (condition)							\
 +		break;							\
 +	__wait_event_cmd(wq, condition, cmd1, cmd2);			\
 +} while (0)
 +
- #define __wait_event_interruptible(wq, condition, ret)			\
- do {									\
- 	DEFINE_WAIT(__wait);						\
- 									\
- 	for (;;) {							\
- 		prepare_to_wait(&wq, &__wait, TASK_INTERRUPTIBLE);	\
- 		if (condition)						\
- 			break;						\
- 		if (!signal_pending(current)) {				\
- 			schedule();					\
- 			continue;					\
- 		}							\
- 		ret = -ERESTARTSYS;					\
- 		break;							\
- 	}								\
- 	finish_wait(&wq, &__wait);					\
- } while (0)
+ #define __wait_event_interruptible(wq, condition)			\
+ 	___wait_event(wq, condition, TASK_INTERRUPTIBLE, 0, 0,		\
+ 		      schedule())
  
  /**
   * wait_event_interruptible - sleep until a condition gets true

  reply	other threads:[~2013-10-16 18:51 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-16 18:51 linux-next: Tree for Oct 16 Thierry Reding
2013-10-16 18:51 ` Thierry Reding [this message]
2013-10-16 20:06   ` linux-next: manual merge of the tip tree Peter Zijlstra
2013-10-16 20:14     ` Peter Zijlstra
2013-10-16 20:31       ` NeilBrown
2013-10-16 20:35         ` Peter Zijlstra
2013-10-16 20:51           ` Thierry Reding
2013-10-16 21:00             ` Peter Zijlstra
2013-10-16 20:52         ` Peter Zijlstra
2013-10-17  1:28           ` NeilBrown
2013-10-17  9:23             ` Peter Zijlstra
2013-10-22  2:09               ` NeilBrown
2013-10-16 20:40       ` Thierry Reding
2013-10-16 20:44     ` Thierry Reding
2013-10-16 21:30   ` Peter Zijlstra
2013-10-17  1:29     ` NeilBrown
2013-10-16 18:51 ` linux-next: manual merge of the kvm-arm tree Thierry Reding
2013-10-16 18:58   ` Marc Zyngier
2013-10-16 19:02     ` Christoffer Dall
2013-10-16 19:04       ` Thierry Reding
2013-10-16 19:09         ` Christoffer Dall
2013-10-17 14:55       ` Gleb Natapov
2013-10-17 16:53         ` Christoffer Dall
2013-10-16 21:48 ` linux-next: Tree for Oct 16 (net/sched/em_ipset.c) Randy Dunlap
2013-10-16 22:39   ` Stephen Hemminger
2013-10-17  0:21     ` Randy Dunlap
2013-10-17  0:29       ` [PATCH net-next] em_ipset: use dev_net() accessor Stephen Hemminger
2013-10-18 20:23         ` David Miller
2013-10-17  0:58 ` linux-next: Tree for Oct 16 Randy Dunlap
2013-10-17  5:12 ` Guenter Roeck
  -- strict thread matches above, loose matches on Subject: below --
2013-10-24 16:31 linux-next: Tree for Oct 24 Thierry Reding
2013-10-25 13:03 ` linux-next: manual merge of the c6x tree Thierry Reding
2013-10-25 13:03   ` linux-next: manual merge of the tip tree Thierry Reding
2013-10-25 13:25     ` Will Deacon
2013-10-26  8:40       ` Ingo Molnar
2013-10-26 14:01         ` Will Deacon
2013-10-27  7:12           ` Ingo Molnar
2013-10-27 10:00             ` Russell King - ARM Linux
2013-10-28  7:47               ` Thierry Reding
2013-10-28  8:45                 ` Russell King - ARM Linux
2013-10-17 21:23 Mark Brown
2013-10-17 21:50 ` Cyrill Gorcunov
2013-09-30 11:26 linux-next: manual merge of the bcon tree Thierry Reding
2013-09-30 11:26 ` linux-next: manual merge of the tip tree Thierry Reding

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=1381949500-501-2-git-send-email-treding@nvidia.com \
    --to=thierry.reding@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=neilb@suse.de \
    --cc=peterz@infradead.org \
    --cc=shli@kernel.org \
    --cc=tglx@linutronix.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;
as well as URLs for NNTP newsgroup(s).