Browse code

- more tm cleanups (removed some f. prototypes for *.h and made them static, - they should not be used outside the timer!)

Andrei Pelinescu-Onciul authored on 19/09/2003 19:20:16
Showing 2 changed files
... ...
@@ -156,6 +156,7 @@ unsigned int timer_id2timeout[NR_OF_TIMER_LISTS] = {
156 156
 /******************** handlers ***************************/
157 157
 
158 158
 
159
+static void unlink_timers( struct cell *t );
159 160
 
160 161
 static void delete_cell( struct cell *p_cell, int unlock )
161 162
 {
... ...
@@ -270,6 +271,8 @@ static void fake_reply(struct cell *t, int branch, int code )
270 271
 }
271 272
 
272 273
 
274
+
275
+
273 276
 inline static void retransmission_handler( void *attr)
274 277
 {
275 278
 	struct retr_buf* r_buf ;
... ...
@@ -583,8 +586,7 @@ void print_timer_list( enum lists list_id)
583 586
 
584 587
 
585 588
 
586
-
587
-void remove_timer_unsafe(  struct timer_link* tl )
589
+static void remove_timer_unsafe(  struct timer_link* tl )
588 590
 {
589 591
 #ifdef EXTRA_DEBUG
590 592
 	if (tl && tl->timer_list &&
... ...
@@ -611,7 +613,7 @@ void remove_timer_unsafe(  struct timer_link* tl )
611 613
 
612 614
 
613 615
 /* put a new cell into a list nr. list_id */
614
-void add_timer_unsafe( struct timer *timer_list, struct timer_link *tl,
616
+static void add_timer_unsafe( struct timer *timer_list, struct timer_link *tl,
615 617
 	unsigned int time_out )
616 618
 {
617 619
 #ifdef EXTRA_DEBUG
... ...
@@ -641,7 +643,7 @@ void add_timer_unsafe( struct timer *timer_list, struct timer_link *tl,
641 643
 
642 644
 
643 645
 /* detach items passed by the time from timer list */
644
-struct timer_link  *check_and_split_time_list( struct timer *timer_list,
646
+static struct timer_link  *check_and_split_time_list( struct timer *timer_list,
645 647
 	int time )
646 648
 {
647 649
 	struct timer_link *tl , *end, *ret;
... ...
@@ -787,7 +789,10 @@ void set_1timer( struct timer_link *new_tl, enum lists list_id )
787 789
 }
788 790
 
789 791
 
790
-void unlink_timers( struct cell *t )
792
+
793
+/* should be called only from timer process context,
794
+ * else it's unsafe */
795
+static void unlink_timers( struct cell *t )
791 796
 {
792 797
 	int i;
793 798
 	int remove_fr, remove_retr;
... ...
@@ -103,9 +103,10 @@ void unlink_timer_lists();
103 103
 void free_timer_table();
104 104
 void init_timer_list( enum lists list_id);
105 105
 void reset_timer_list( enum lists list_id);
106
-void remove_timer_unsafe(  struct timer_link* tl ) ;
106
+/*void remove_timer_unsafe(  struct timer_link* tl ) ;
107 107
 void add_timer_unsafe( struct timer*, struct timer_link*, unsigned int);
108 108
 struct timer_link  *check_and_split_time_list( struct timer*, int);
109
+*/
109 110
 
110 111
 void reset_timer( struct timer_link* tl );
111 112
 /* determine timer length and put on a correct timer list */
... ...
@@ -113,7 +114,7 @@ void set_timer( struct timer_link *new_tl, enum lists list_id );
113 114
 /* similar to set_timer, except it allows only one-time
114 115
    timer setting and all later attempts are ignored */
115 116
 void set_1timer( struct timer_link *new_tl, enum lists list_id );
116
-void unlink_timers( struct cell *t );
117
+/*void unlink_timers( struct cell *t );*/
117 118
 void timer_routine(unsigned int, void*);
118 119
 
119 120