patch-2.3.99-pre7 linux/include/linux/timer.h

Next file: linux/include/linux/usb.h
Previous file: linux/include/linux/swap.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre6/linux/include/linux/timer.h linux/include/linux/timer.h
@@ -2,6 +2,7 @@
 #define _LINUX_TIMER_H
 
 #include <linux/config.h>
+#include <linux/list.h>
 
 /*
  * Old-style timers. Please don't use for any new code.
@@ -47,8 +48,7 @@
  * to distinguish between the different invocations.
  */
 struct timer_list {
-	struct timer_list *next; /* MUST be first element */
-	struct timer_list *prev;
+	struct list_head list;
 	unsigned long expires;
 	unsigned long data;
 	void (*function)(unsigned long);
@@ -56,7 +56,7 @@
 };
 
 extern void add_timer(struct timer_list * timer);
-extern int  del_timer(struct timer_list * timer);
+extern int del_timer(struct timer_list * timer);
 
 /*
  * mod_timer is a more efficient way to update the expire field of an
@@ -67,18 +67,17 @@
 
 extern void it_real_fn(unsigned long);
 
-extern inline void init_timer(struct timer_list * timer)
+static inline void init_timer(struct timer_list * timer)
 {
-	timer->next = NULL;
-	timer->prev = NULL;
+	timer->list.next = timer->list.prev = NULL;
 #ifdef CONFIG_SMP
 	timer->running = 0;
 #endif
 }
 
-extern inline int timer_pending(const struct timer_list * timer)
+static inline int timer_pending (const struct timer_list * timer)
 {
-	return timer->prev != NULL;
+	return timer->list.next != NULL;
 }
 
 #ifdef CONFIG_SMP

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)