Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Kernel v2.5.75 /kernel/timer.c

Filename:/kernel/timer.c
Lines Added:10
Lines Deleted:6
Also changed in: (Previous) 2.5.74-bk7  2.5.74-bk6  2.5.74-bk5  2.5.74  2.5.73-bk10  2.5.73-bk9 
(Following)

Location
[  2.5.75
  [  kernel
     o  timer.c

Patch

diff -Nru a/kernel/timer.c b/kernel/timer.c
--- a/kernel/timer.c   Thu Jul 10 13:16:28 2003
+++ b/kernel/timer.c   Thu Jul 10 13:16:28 2003
@@ -126,13 +126,17 @@
        * or you set a timer to go off in the past
        */
       vec = base->tv1.vec + (base->timer_jiffies & TVR_MASK);
-   } else if (idx <= 0xffffffffUL) {
-      int i = (expires >> (TVR_BITS + 3 * TVN_BITS)) & TVN_MASK;
-      vec = base->tv5.vec + i;
    } else {
-      /* Can only get here on architectures with 64-bit jiffies */
-      INIT_LIST_HEAD(&timer->entry);
-      return;
+      int i;
+      /* If the timeout is larger than 0xffffffff on 64-bit
+       * architectures then we use the maximum timeout:
+       */
+      if (idx > 0xffffffffUL) {
+         idx = 0xffffffffUL;
+         expires = idx + base->timer_jiffies;
+      }
+      i = (expires >> (TVR_BITS + 3 * TVN_BITS)) & TVN_MASK;
+      vec = base->tv5.vec + i;
    }
    /*
     * Timers are FIFO:


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.