1. 26 5月, 2010 2 次提交
    • T
      timers: Move local variable into else section · 2abfb9e1
      Thomas Gleixner 提交于
      Fix nit-picking coding style detail.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      2abfb9e1
    • T
      timers: Fix slack calculation really · 8e63d779
      Thomas Gleixner 提交于
      commit f00e047e (timers: Fix slack calculation for expired timers)
      fixed the issue of slack on expired timers only partially. Linus
      noticed that jiffies is volatile so it is reloaded twice, which
      generates bad code.
      
      But its worse. This can defeat the time_after() check if jiffies are
      incremented between time_after() and the slack calculation.
      
      Fix it by reading jiffies into a local variable, which prevents the
      compiler from loading it twice. While at it make the > -1 check into
      >= 0 which is easier to read.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      8e63d779
  2. 25 5月, 2010 38 次提交