? sys/cscope.out
? sys/netinet6/cscope.out
Index: sys/dev/acpica5/acpi_timer.c
===================================================================
RCS file: /home/dcvs/src/sys/dev/acpica5/acpi_timer.c,v
retrieving revision 1.4
diff -u -p -r1.4 acpi_timer.c
--- sys/dev/acpica5/acpi_timer.c	1 Jun 2005 20:40:33 -0000	1.4
+++ sys/dev/acpica5/acpi_timer.c	8 Jun 2005 18:15:52 -0000
@@ -69,7 +69,7 @@ static sysclock_t acpi_timer_get_timecou
 static void acpi_timer_construct(struct cputimer *timer, sysclock_t oldclock);
 
 static struct cputimer acpi_cputimer = {
-	NULL,
+	SLIST_ENTRY_INITIALIZER,
 	"ACPI",
 	CPUTIMER_PRI_ACPI,
 	CPUTIMER_ACPI,
Index: sys/i386/isa/clock.c
===================================================================
RCS file: /home/dcvs/src/sys/i386/isa/clock.c,v
retrieving revision 1.28
diff -u -p -r1.28 clock.c
--- sys/i386/isa/clock.c	3 Jun 2005 17:14:51 -0000	1.28
+++ sys/i386/isa/clock.c	8 Jun 2005 18:15:57 -0000
@@ -149,7 +149,7 @@ static void i8254_cputimer_construct(str
 static void i8254_cputimer_destruct(struct cputimer *cputimer);
 
 static struct cputimer	i8254_cputimer = {
-    NULL,
+    SLIST_ENTRY_INITIALIZER,
     "i8254",
     CPUTIMER_PRI_8254,
     0,
Index: sys/kern/kern_cputimer.c
===================================================================
RCS file: /home/dcvs/src/sys/kern/kern_cputimer.c,v
retrieving revision 1.3
diff -u -p -r1.3 kern_cputimer.c
--- sys/kern/kern_cputimer.c	1 Jun 2005 22:25:12 -0000	1.3
+++ sys/kern/kern_cputimer.c	8 Jun 2005 18:15:57 -0000
@@ -49,7 +49,7 @@
 static sysclock_t dummy_cputimer_count(void);
 
 static struct cputimer dummy_cputimer = {
-    NULL,
+    SLIST_ENTRY_INITIALIZER,
     "dummy",
     CPUTIMER_PRI_DUMMY,
     CPUTIMER_DUMMY,
@@ -64,8 +64,8 @@ static struct cputimer dummy_cputimer = 
     0
 };
 
-static struct cputimer *cputimer_reg_base = &dummy_cputimer;
 struct cputimer *sys_cputimer = &dummy_cputimer;
+SLIST_HEAD(, cputimer) cputimerhead = SLIST_HEAD_INITIALIZER(&cputimerhead);
 
 /*
  * Generic cputimer API
@@ -105,18 +105,19 @@ cputimer_select(struct cputimer *timer, 
 void
 cputimer_register(struct cputimer *timer)
 {
-    struct cputimer **scanpp;
     struct cputimer *scan;
 
-    for (scanpp = &cputimer_reg_base; 
-	 (scan = *scanpp) != NULL;
-	 scanpp = &scan->next
-    ) {
+    /*
+     * Initialize dummy_cputimer if the slist is empty, it does not get
+     * registered the normal way.
+     */
+    if (SLIST_EMPTY(&cputimerhead))
+	SLIST_FIRST(&cputimerhead) = &dummy_cputimer;
+    SLIST_FOREACH(scan, &cputimerhead, next) {
 	if (scan == timer)
 	    return;
     }
-    timer->next = NULL;
-    *scanpp = timer;
+    SLIST_INSERT_HEAD(&cputimerhead, timer, next);
 }
 
 /*
@@ -125,7 +126,6 @@ cputimer_register(struct cputimer *timer
 void
 cputimer_deregister(struct cputimer *timer)
 {
-    struct cputimer **scanpp;
     struct cputimer *scan;
     struct cputimer *best;
 
@@ -133,15 +133,13 @@ cputimer_deregister(struct cputimer *tim
      * Locate and remove the timer.  If the timer is our currently active
      * timer, revert to the dummy timer.
      */
-    scanpp = &cputimer_reg_base; 
-    while ((scan = *scanpp) != NULL) {
-	if (scan == timer) {
-	    *scanpp = timer->next;
-	    if (timer == sys_cputimer)
-		cputimer_select(&dummy_cputimer, 0x7FFFFFFF);
-	} else {
-	    scanpp = &scan->next;
-	}
+    SLIST_FOREACH(scan, &cputimerhead, next) {
+	    if (timer == scan) {
+		if (timer == sys_cputimer)
+		    cputimer_select(&dummy_cputimer, 0x7FFFFFFF);
+		SLIST_REMOVE(&cputimerhead, timer, cputimer, next);
+		break;
+	    }
     }
 
     /*
@@ -149,7 +147,7 @@ cputimer_deregister(struct cputimer *tim
      */
     if (sys_cputimer == &dummy_cputimer) {
 	best = NULL;
-	for (scan = cputimer_reg_base; scan; scan = scan->next) {
+	SLIST_FOREACH(scan, &cputimerhead, next) {
 	    if (best == NULL || scan->pri > best->pri)
 		best = scan;
 	}
@@ -225,7 +223,7 @@ sysctl_cputimer_reglist(SYSCTL_HANDLER_A
     /*
      * Build a list of available timers
      */
-    for (scan = cputimer_reg_base; scan; scan = scan->next) {
+    SLIST_FOREACH(scan, &cputimerhead, next) {
 	if (error == 0 && loop)
 	    error = SYSCTL_OUT(req, " ", 1);
 	if (error == 0)
Index: sys/sys/systimer.h
===================================================================
RCS file: /home/dcvs/src/sys/sys/systimer.h,v
retrieving revision 1.8
diff -u -p -r1.8 systimer.h
--- sys/sys/systimer.h	2 Jun 2005 21:51:31 -0000	1.8
+++ sys/sys/systimer.h	8 Jun 2005 18:15:59 -0000
@@ -82,7 +82,7 @@ void systimer_init_oneshot(systimer_t, v
  */
 
 struct cputimer {
-    struct cputimer *next;
+    SLIST_ENTRY(cputimer) next;
     const char	*name;
     int		pri;
     int		type;
