Browse code

timer.c: logging: DBG -> LM_DBG

Ovidiu Sas authored on 13/01/2015 14:38:39
Showing 1 changed files
... ...
@@ -252,7 +252,7 @@ int init_timer()
252 252
 		goto error;
253 253
 	}
254 254
 	last_time=start_time;
255
-	DBG("init_timer: starting with *ticks=%u\n", (unsigned) *ticks);
255
+	LM_DBG("starting with *ticks=%u\n", (unsigned) *ticks);
256 256
 	
257 257
 	/* init timer structures */
258 258
 	for (r=0; r<H0_ENTRIES; r++)
... ...
@@ -293,7 +293,7 @@ int init_timer()
293 293
 	
294 294
 #endif
295 295
 	
296
-	DBG("init_timer: timer_list between %p and %p\n",
296
+	LM_DBG("timer_list between %p and %p\n",
297 297
 			&timer_lst->h0[0], &timer_lst->h2[H2_ENTRIES]);
298 298
 	return 0;
299 299
 error:
... ...
@@ -435,7 +435,7 @@ inline static void adjust_ticks(void)
435 435
 #ifndef TIMER_DEBUG
436 436
 					if (delta > 2*(s_ticks_t)TIMER_MAX_DRIFT+1)
437 437
 #endif
438
-						DBG("adjusting timer ticks (%lu) with %ld ms"
438
+						LM_DBG("adjusting timer ticks (%lu) with %ld ms"
439 439
 								" (%ld ticks)\n",
440 440
 								(unsigned long)*ticks,
441 441
 							(long)(delta*1000)/TIMER_TICKS_HZ, (long)delta);
... ...
@@ -570,7 +570,7 @@ int timer_add_safe(struct timer_ln* tl, ticks_t delta)
570 570
 					tl->del_calls, tl->del_func, tl->del_file, tl->del_line,
571 571
 					tl->init, tl->expires_no);
572 572
 #else
573
-		DBG("timer_add called on an active timer %p (%p, %p),"
573
+		LM_DBG("timer_add called on an active timer %p (%p, %p),"
574 574
 					" flags %x\n", tl, tl->next, tl->prev, tl->flags);
575 575
 #endif
576 576
 		ret=-1; /* refusing to add active or non-reinit. timer */
... ...
@@ -629,7 +629,7 @@ again:
629 629
 					tl->init, tl->expires_no);
630 630
 #else
631 631
 /*
632
-		DBG("timer_del called on an inactive timer %p (%p, %p),"
632
+		LM_DBG("called on an inactive timer %p (%p, %p),"
633 633
 					" flags %x\n", tl, tl->next, tl->prev, tl->flags);
634 634
 */
635 635
 #endif
... ...
@@ -695,7 +695,7 @@ again:
695 695
 						tl->init, tl->expires_no);
696 696
 #else
697 697
 /*
698
-				DBG("timer_del: (s) timer %p (%p, %p) flags %x "
698
+				LM_DBG("(s) timer %p (%p, %p) flags %x "
699 699
 							"already detached\n",
700 700
 							tl, tl->next, tl->prev, tl->flags);
701 701
 */
... ...
@@ -765,7 +765,7 @@ again:
765 765
 						tl->init, tl->expires_no);
766 766
 #else
767 767
 /*
768
-				DBG("timer_del: (f) timer %p (%p, %p) flags %x "
768
+				LM_DBG("(f) timer %p (%p, %p) flags %x "
769 769
 							"already detached\n",
770 770
 							tl, tl->next, tl->prev, tl->flags);
771 771
 */
... ...
@@ -828,7 +828,7 @@ inline static void timer_list_expire(ticks_t t, struct timer_head* h
828 828
 	first=h->next;
829 829
 #endif
830 830
 	
831
-	/*DBG("timer_list_expire @ ticks = %lu, list =%p\n",
831
+	/*LM_DBG("@ ticks = %lu, list =%p\n",
832 832
 			(unsigned long) *ticks, h);
833 833
 	*/
834 834
 	while(h->next!=(struct timer_ln*)h){
... ...
@@ -914,7 +914,7 @@ static void timer_handler(void)
914 914
 	i=(slow_idx_t)(*t_idx%SLOW_LISTS_NO);
915 915
 #endif
916 916
 	
917
-	/*DBG("timer_handler: called, ticks=%lu, prev_ticks=%lu\n",
917
+	/*LM_DBG("called, ticks=%lu, prev_ticks=%lu\n",
918 918
 			(unsigned long)*ticks, (unsigned long)prev_ticks);
919 919
 	*/
920 920
 	run_timer=0; /* reset run_timer */
... ...
@@ -989,7 +989,7 @@ static ticks_t compat_old_handler(ticks_t ti, struct timer_ln* tl,
989 989
 	struct sr_timer* t;
990 990
 	
991 991
 #ifdef TIMER_DEBUG
992
-	DBG("timer: compat_old_handler: calling, ticks=%u/%u, tl=%p, t=%p\n",
992
+	LM_DBG("calling, ticks=%u/%u, tl=%p, t=%p\n",
993 993
 			prev_ticks, (unsigned)*ticks, tl, data);
994 994
 #endif
995 995
 	t=(struct sr_timer*)data;