public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* backwards busy wait using "time_before()"??
@ 2009-12-31 16:40 Robert P. J. Day
  2009-12-31 19:23 ` Robert P. J. Day
  2010-01-01 15:17 ` Andi Kleen
  0 siblings, 2 replies; 3+ messages in thread
From: Robert P. J. Day @ 2009-12-31 16:40 UTC (permalink / raw)
  To: Linux Kernel Mailing List


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-01 15:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-31 16:40 backwards busy wait using "time_before()"?? Robert P. J. Day
2009-12-31 19:23 ` Robert P. J. Day
2010-01-01 15:17 ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox