Index: kernel/generic/src/proc/scheduler.c
===================================================================
--- kernel/generic/src/proc/scheduler.c	(revision 43ac0cc8db6bc450575f52825b86408b5d028e4f)
+++ kernel/generic/src/proc/scheduler.c	(revision b72efe87f3e33beaa3b0d0cf7c8b598a58f6a6de)
@@ -237,6 +237,6 @@
 		 * Take the first thread from the queue.
 		 */
-		thread_t *thread =
-		    list_get_instance(CPU->rq[i].rq_head.next, thread_t, rq_link);
+		thread_t *thread = list_get_instance(
+		    list_first(&CPU->rq[i].rq), thread_t, rq_link);
 		list_remove(&thread->rq_link);
 		
@@ -273,7 +273,7 @@
 static void relink_rq(int start)
 {
-	link_t head;
-	
-	list_initialize(&head);
+	list_t list;
+	
+	list_initialize(&list);
 	irq_spinlock_lock(&CPU->lock, false);
 	
@@ -284,5 +284,5 @@
 			
 			irq_spinlock_lock(&CPU->rq[i + 1].lock, false);
-			list_concat(&head, &CPU->rq[i + 1].rq_head);
+			list_concat(&list, &CPU->rq[i + 1].rq);
 			size_t n = CPU->rq[i + 1].n;
 			CPU->rq[i + 1].n = 0;
@@ -292,5 +292,5 @@
 			
 			irq_spinlock_lock(&CPU->rq[i].lock, false);
-			list_concat(&CPU->rq[i].rq_head, &head);
+			list_concat(&CPU->rq[i].rq, &list);
 			CPU->rq[i].n += n;
 			irq_spinlock_unlock(&CPU->rq[i].lock, false);
@@ -616,7 +616,7 @@
 			
 			/* Search rq from the back */
-			link_t *link = cpu->rq[rq].rq_head.prev;
-			
-			while (link != &(cpu->rq[rq].rq_head)) {
+			link_t *link = cpu->rq[rq].rq.head.prev;
+			
+			while (link != &(cpu->rq[rq].rq.head)) {
 				thread = (thread_t *) list_get_instance(link,
 				    thread_t, rq_link);
@@ -740,9 +740,7 @@
 			
 			printf("\trq[%u]: ", i);
-			link_t *cur;
-			for (cur = cpus[cpu].rq[i].rq_head.next;
-			    cur != &(cpus[cpu].rq[i].rq_head);
-			    cur = cur->next) {
-				thread_t *thread = list_get_instance(cur, thread_t, rq_link);
+			list_foreach(cpus[cpu].rq[i].rq, cur) {
+				thread_t *thread = list_get_instance(cur,
+				    thread_t, rq_link);
 				printf("%" PRIu64 "(%s) ", thread->tid,
 				    thread_states[thread->state]);
