Messages in this thread | | | Date | Thu, 31 Dec 2009 11:40:42 -0500 (EST) | From | "Robert P. J. Day" <> | Subject | backwards busy wait using "time_before()"?? |
| |
if this is an idiotic question, i'll blame it on the fact that there's only decaf left in the house.
from drivers/spi/spi_stmp.c:
#define busy_wait(cond) \ ({ \ unsigned long end_jiffies = jiffies + STMP_SPI_TIMEOUT; \ bool succeeded = false; \ do { \ if (cond) { \ succeeded = true; \ break; \ } \ cpu_relax(); \ } while (time_before(end_jiffies, jiffies)); \ succeeded; \ })
is it just me, or do those arguments to time_before() look backwards?
rday --
======================================================================== Robert P. J. Day Waterloo, Ontario, CANADA
Linux Consulting, Training and Kernel Pedantry.
Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday ========================================================================
| |