Re: linux-next: manual merge of the tip tree

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

 



On Wed, Oct 16, 2013 at 08:51:39PM +0200, Thierry Reding wrote:
> 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.

>  +#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)

Ideally we'd write the new thing like:

#define __wait_event_cmd(wq, condition, cmd1, cmd2) 			\
	(void)___wait_event(wq, condition, TASK_UNINTERRUPTIBLE, 0, 0,	\
			    cmd1; schedule(); cmd2)


--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux