patch-2.1.25 linux/net/rose/rose_timer.c
Next file: linux/net/rose/sysctl_net_rose.c
Previous file: linux/net/rose/rose_route.c
Back to the patch index
Back to the overall index
- Lines: 50
- Date:
Sun Feb 2 15:18:52 1997
- Orig file:
v2.1.24/linux/net/rose/rose_timer.c
- Orig date:
Thu Jan 23 21:06:59 1997
diff -u --recursive --new-file v2.1.24/linux/net/rose/rose_timer.c linux/net/rose/rose_timer.c
@@ -43,37 +43,20 @@
static void rose_timer(unsigned long);
/*
- * Linux set/reset timer routines
+ * Linux set timer
*/
void rose_set_timer(struct sock *sk)
{
unsigned long flags;
- save_flags(flags);
- cli();
- del_timer(&sk->timer);
- restore_flags(flags);
-
- sk->timer.next = sk->timer.prev = NULL;
- sk->timer.data = (unsigned long)sk;
- sk->timer.function = &rose_timer;
-
- sk->timer.expires = jiffies + 10;
- add_timer(&sk->timer);
-}
-
-static void rose_reset_timer(struct sock *sk)
-{
- unsigned long flags;
-
- save_flags(flags);
- cli();
+ save_flags(flags); cli();
del_timer(&sk->timer);
restore_flags(flags);
sk->timer.data = (unsigned long)sk;
sk->timer.function = &rose_timer;
sk->timer.expires = jiffies + 10;
+
add_timer(&sk->timer);
}
@@ -121,7 +104,7 @@
}
if (sk->protinfo.rose->timer == 0 || --sk->protinfo.rose->timer > 0) {
- rose_reset_timer(sk);
+ rose_set_timer(sk);
return;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov