Browse code

- tm cleanups ported form stable

Andrei Pelinescu-Onciul authored on 19/09/2003 19:20:36
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 ;
... ...
@@ -578,8 +581,7 @@ void print_timer_list( enum lists list_id)
578 581
 
579 582
 
580 583
 
581
-
582
-void remove_timer_unsafe(  struct timer_link* tl )
584
+static void remove_timer_unsafe(  struct timer_link* tl )
583 585
 {
584 586
 #ifdef EXTRA_DEBUG
585 587
 	if (tl && tl->timer_list &&
... ...
@@ -606,7 +608,7 @@ void remove_timer_unsafe(  struct timer_link* tl )
606 608
 
607 609
 
608 610
 /* put a new cell into a list nr. list_id */
609
-void add_timer_unsafe( struct timer *timer_list, struct timer_link *tl,
611
+static void add_timer_unsafe( struct timer *timer_list, struct timer_link *tl,
610 612
 	unsigned int time_out )
611 613
 {
612 614
 #ifdef EXTRA_DEBUG
... ...
@@ -636,7 +638,7 @@ void add_timer_unsafe( struct timer *timer_list, struct timer_link *tl,
636 638
 
637 639
 
638 640
 /* detach items passed by the time from timer list */
639
-struct timer_link  *check_and_split_time_list( struct timer *timer_list,
641
+static struct timer_link  *check_and_split_time_list( struct timer *timer_list,
640 642
 	int time )
641 643
 {
642 644
 	struct timer_link *tl , *end, *ret;
... ...
@@ -782,7 +784,10 @@ void set_1timer( struct timer_link *new_tl, enum lists list_id )
782 784
 }
783 785
 
784 786
 
785
-void unlink_timers( struct cell *t )
787
+
788
+/* should be called only from timer process context,
789
+ * else it's unsafe */
790
+static void unlink_timers( struct cell *t )
786 791
 {
787 792
 	int i;
788 793
 	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