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-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.0912311136560.3596@localhost>
Date:	Thu, 31 Dec 2009 11:40:42 -0500 (EST)
From:	"Robert P. J. Day" <rpjday@...shcourse.ca>
To:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
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
========================================================================
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ