Index: kernel/generic/src/sysinfo/stats.c
===================================================================
--- kernel/generic/src/sysinfo/stats.c	(revision ef1eab71c59f1782c6211550d5ee608250a791e0)
+++ kernel/generic/src/sysinfo/stats.c	(revision 9c26ef0ab86146cbf34945fa1e96ad602fa9c891)
@@ -246,5 +246,5 @@
 
 	/* Count the tasks */
-	size_t count = odict_count(&tasks);
+	size_t count = task_count();
 
 	if (count == 0) {
@@ -271,8 +271,6 @@
 	/* Gather the statistics for each task */
 	size_t i = 0;
-	odlink_t *odlink = odict_first(&tasks);
-	while (odlink != NULL) {
-		task_t *task = odict_get_instance(odlink, task_t, ltasks);
-
+	task_t *task = task_first();
+	while (task != NULL) {
 		/* Interrupts are already disabled */
 		irq_spinlock_lock(&(task->lock), false);
@@ -283,5 +281,5 @@
 
 		irq_spinlock_unlock(&(task->lock), false);
-		odlink = odict_next(odlink, &tasks);
+		task = task_next(task);
 	}
 
@@ -336,5 +334,5 @@
 
 	/* Count the threads */
-	size_t count = odict_count(&threads);
+	size_t count = thread_count();
 
 	if (count == 0) {
@@ -362,9 +360,6 @@
 	size_t i = 0;
 
-	odlink_t *odlink = odict_first(&threads);
-	while (odlink != NULL) {
-		thread_t *thread = odict_get_instance(odlink, thread_t,
-		    lthreads);
-
+	thread_t *thread = thread_first();
+	while (thread != NULL) {
 		/* Interrupts are already disabled */
 		irq_spinlock_lock(&thread->lock, false);
@@ -376,5 +371,5 @@
 		irq_spinlock_unlock(&thread->lock, false);
 
-		odlink = odict_next(odlink, &threads);
+		thread = thread_next(thread);
 	}
 
