On Thu, 6 Jun 2013 22:03:16 +0200 Oleg Nesterov <o...@redhat.com> wrote:
> 1. wait_event_timeout(wq, true, 0) returns zero, I think this is > wrong and should be fixed. > > __wait_event_timeout() was already changed by 4c663cfc but we > need the same logic in wait_event_timeout() if the fast-path > check succeeds. > > 2. wait_event_timeout/__wait_event_timeout interface do not match > wait_event(), you can't use __wait_event_timeout() instead of > wait_event_timeout() if you do not need the fast-path check. > > 3. wait_event_* macros duplicate the same code. > > This patch adds a single helper wait_event_common() which hopefully > does everything right. Compiler optimizes out the "dead" code when > we do not need signal_pending/schedule_timeout. > > With this patch "size vmlinux" reports that .text/data shrinks but > I think this depends on gcc/config. hm, > -#define __wait_event_interruptible(wq, condition, ret) > +#define __wait_event_interruptible(wq, condition) net/irda/af_irda.c:2568:13: error: macro "__wait_event_interruptible" passed 3 arguments, but takes just 2 waddup with that? __wait_event_interruptible() has several callsites. I think I'll go zap and await v2 ;) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/