[dahdi-commits] sruffell: branch linux/sruffell/dahdi-linux-nodummy r6850 - /linux/team/sruff...
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Fri Jul 17 10:28:10 CDT 2009
Author: sruffell
Date: Fri Jul 17 10:28:06 2009
New Revision: 6850
URL: http://svn.asterisk.org/svn-view/dahdi?view=rev&rev=6850
Log:
dahdi-base: Remove some magic numbers from the coretimer code.
Modified:
linux/team/sruffell/dahdi-linux-nodummy/drivers/dahdi/dahdi-base.c
Modified: linux/team/sruffell/dahdi-linux-nodummy/drivers/dahdi/dahdi-base.c
URL: http://svn.asterisk.org/svn-view/dahdi/linux/team/sruffell/dahdi-linux-nodummy/drivers/dahdi/dahdi-base.c?view=diff&rev=6850&r1=6849&r2=6850
==============================================================================
--- linux/team/sruffell/dahdi-linux-nodummy/drivers/dahdi/dahdi-base.c (original)
+++ linux/team/sruffell/dahdi-linux-nodummy/drivers/dahdi/dahdi-base.c Fri Jul 17 10:28:06 2009
@@ -7954,6 +7954,8 @@
unsigned long ms_since_start;
struct timespec now;
const unsigned long MAX_INTERVAL = 100000L;
+ const unsigned long 4MS_INTERVAL = HZ/250;
+ const unsigned long 1S_INTERVAL = HZ;
now = current_kernel_time();
@@ -7965,7 +7967,7 @@
* perform the master span processing itself. */
if (!atomic_read(&core_timer.shutdown))
- mod_timer(&core_timer.timer, jiffies + HZ/250);
+ mod_timer(&core_timer.timer, jiffies + 4MS_INTERVAL);
ms_since_start = core_diff_ms(&core_timer.start_interval, &now);
while (ms_since_start > atomic_read(&core_timer.count))
@@ -7988,7 +7990,7 @@
atomic_set(&core_timer.last_count, 0);
core_timer.start_interval = now;
if (!atomic_read(&core_timer.shutdown))
- mod_timer(&core_timer.timer, jiffies + HZ);
+ mod_timer(&core_timer.timer, jiffies + 1S_INTERVAL);
}
}
More information about the dahdi-commits
mailing list