lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131017122922.69b41b11@notabene.brown>
Date:	Thu, 17 Oct 2013 12:29:22 +1100
From:	NeilBrown <neilb@...e.de>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Thierry Reding <thierry.reding@...il.com>,
	Shaohua Li <shli@...nel.org>, Ingo Molnar <mingo@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>, linux-next@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: linux-next: manual merge of the tip tree

On Wed, 16 Oct 2013 23:30:05 +0200 Peter Zijlstra <peterz@...radead.org>
wrote:

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

Oooo.. that looks much nicer.  I'll make it look like that before it goes
upstream.

Thanks,
NeilBrown

Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ