[dahdi-commits] tzafrir: linux/trunk r10451 - /linux/trunk/drivers/dahdi/dahdi-base.c

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Wed Jan 25 15:19:48 CST 2012


Author: tzafrir
Date: Wed Jan 25 15:19:45 2012
New Revision: 10451

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10451
Log:
show Master change to/from core timer

show Master change to/from core timer if DEBUG_MAIN (GENERAL) flag is on.

Signed-off-by: Oron Peled <oron.peled at xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

Modified:
    linux/trunk/drivers/dahdi/dahdi-base.c

Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=10451&r1=10450&r2=10451
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Wed Jan 25 15:19:45 2012
@@ -190,6 +190,7 @@
 	struct timer_list timer;
 	struct timespec start_interval;
 	unsigned long interval;
+	int dahdi_receive_used;
 	atomic_t count;
 	atomic_t shutdown;
 	atomic_t last_count;
@@ -9620,6 +9621,10 @@
 		/* This is the code path if a board driver is not calling
 		 * dahdi_receive, and therefore the core of dahdi needs to
 		 * perform the master span processing itself. */
+		if (core_timer.dahdi_receive_used) {
+			core_timer.dahdi_receive_used = 0;
+			dahdi_dbg(GENERAL, "Master changed to core_timer\n");
+		}
 
 		if (!atomic_read(&core_timer.shutdown)) {
 			mod_timer(&core_timer.timer, jiffies +
@@ -9665,6 +9670,10 @@
 
 		/* It looks like a board driver is calling dahdi_receive. We
 		 * will just check again in a second. */
+		if (!core_timer.dahdi_receive_used) {
+			core_timer.dahdi_receive_used = 1;
+			dahdi_dbg(GENERAL, "Master is no longer core_timer\n");
+		}
 		atomic_set(&core_timer.count, 0);
 		atomic_set(&core_timer.last_count, 0);
 		core_timer.start_interval = now;




More information about the dahdi-commits mailing list