From: Valdis.Kletnieks@vt.edu (Valdis.Kletnieks at vt.edu) Date: Wed, 11 Mar 2015 13:00:13 -0400 Subject: confusing code....whats the point of this construct ? In-Reply-To: Your message of "Wed, 11 Mar 2015 17:46:56 +0100." <20150311164656.GA22024@opentech.at> References: <20150311141744.GC23845@opentech.at> <55475.1426084817@turing-police.cc.vt.edu> <87twxr4llm.fsf@nemi.mork.no> <20150311164656.GA22024@opentech.at> Message-ID: <66204.1426093213@turing-police.cc.vt.edu> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Wed, 11 Mar 2015 17:46:56 +0100, Nicholas Mc Guire said: > ret = ({ long __ret = (5*250); > do { _cond_resched(); } while (0); > if (!({ > bool __cond = (({ Gaak. > ret = wait_event_timeout(mgr->tx_waitq, > check_txmsg_state(mgr, txmsg), > (4 * HZ)); -EGADS - use of macro as a function violates the Principle of Least Surprise.... I have to wonder how many other places we've got bugs waiting to happen because of this.... -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150311/ed4cdeae/attachment.bin