Index: kernel/generic/src/console/chardev.c
===================================================================
--- kernel/generic/src/console/chardev.c	(revision 4ce914d4d867104231d15513fe8669e434fea7b2)
+++ kernel/generic/src/console/chardev.c	(revision 5df79286ec53ba587ac1719375829cb7f78acfe9)
@@ -52,5 +52,5 @@
 	indev->name = name;
 	waitq_initialize(&indev->wq);
-	spinlock_initialize(&indev->lock, "indev");
+	irq_spinlock_initialize(&indev->lock, "chardev.indev.lock");
 	indev->counter = 0;
 	indev->index = 0;
@@ -68,8 +68,8 @@
 	ASSERT(indev);
 	
-	spinlock_lock(&indev->lock);
+	irq_spinlock_lock(&indev->lock, true);
 	if (indev->counter == INDEV_BUFLEN - 1) {
 		/* Buffer full */
-		spinlock_unlock(&indev->lock);
+		irq_spinlock_unlock(&indev->lock, true);
 		return;
 	}
@@ -81,5 +81,5 @@
 	indev->index = indev->index % INDEV_BUFLEN;
 	waitq_wakeup(&indev->wq, WAKEUP_FIRST);
-	spinlock_unlock(&indev->lock);
+	irq_spinlock_unlock(&indev->lock, true);
 }
 
@@ -114,10 +114,8 @@
 	
 	waitq_sleep(&indev->wq);
-	ipl_t ipl = interrupts_disable();
-	spinlock_lock(&indev->lock);
+	irq_spinlock_lock(&indev->lock, true);
 	wchar_t ch = indev->buffer[(indev->index - indev->counter) % INDEV_BUFLEN];
 	indev->counter--;
-	spinlock_unlock(&indev->lock);
-	interrupts_restore(ipl);
+	irq_spinlock_unlock(&indev->lock, true);
 	
 	return ch;
@@ -134,5 +132,5 @@
 {
 	outdev->name = name;
-	spinlock_initialize(&outdev->lock, "outdev");
+	spinlock_initialize(&outdev->lock, "chardev.outdev.lock");
 	link_initialize(&outdev->link);
 	list_initialize(&outdev->list);
Index: kernel/generic/src/console/cmd.c
===================================================================
--- kernel/generic/src/console/cmd.c	(revision 4ce914d4d867104231d15513fe8669e434fea7b2)
+++ kernel/generic/src/console/cmd.c	(revision 5df79286ec53ba587ac1719375829cb7f78acfe9)
@@ -510,5 +510,5 @@
 void cmd_initialize(cmd_info_t *cmd)
 {
-	spinlock_initialize(&cmd->lock, "cmd");
+	spinlock_initialize(&cmd->lock, "cmd.lock");
 	link_initialize(&cmd->link);
 }
@@ -681,15 +681,18 @@
 			continue;
 		
-		thread_t *t;
-		if ((t = thread_create((void (*)(void *)) cmd_call0, (void *) argv, TASK, THREAD_FLAG_WIRED, "call0", false))) {
-			spinlock_lock(&t->lock);
-			t->cpu = &cpus[i];
-			spinlock_unlock(&t->lock);
-			printf("cpu%u: ", i);
-			thread_ready(t);
-			thread_join(t);
-			thread_detach(t);
+		thread_t *thread;
+		if ((thread = thread_create((void (*)(void *)) cmd_call0,
+		    (void *) argv, TASK, THREAD_FLAG_WIRED, "call0", false))) {
+			irq_spinlock_lock(&thread->lock, true);
+			thread->cpu = &cpus[i];
+			irq_spinlock_unlock(&thread->lock, true);
+			
+			printf("cpu%" PRIs ": ", i);
+			
+			thread_ready(thread);
+			thread_join(thread);
+			thread_detach(thread);
 		} else
-			printf("Unable to create thread for cpu%u\n", i);
+			printf("Unable to create thread for cpu%" PRIs "\n", i);
 	}
 	
@@ -1049,10 +1052,8 @@
 	/* Update and read thread accounting
 	   for benchmarking */
-	ipl_t ipl = interrupts_disable();
-	spinlock_lock(&TASK->lock);
+	irq_spinlock_lock(&TASK->lock, true);
 	uint64_t ucycles0, kcycles0;
 	task_get_accounting(TASK, &ucycles0, &kcycles0);
-	spinlock_unlock(&TASK->lock);
-	interrupts_restore(ipl);
+	irq_spinlock_unlock(&TASK->lock, true);
 	
 	/* Execute the test */
@@ -1061,10 +1062,8 @@
 	
 	/* Update and read thread accounting */
-	uint64_t ucycles1, kcycles1; 
-	ipl = interrupts_disable();
-	spinlock_lock(&TASK->lock);
+	uint64_t ucycles1, kcycles1;
+	irq_spinlock_lock(&TASK->lock, true);
 	task_get_accounting(TASK, &ucycles1, &kcycles1);
-	spinlock_unlock(&TASK->lock);
-	interrupts_restore(ipl);
+	irq_spinlock_unlock(&TASK->lock, true);
 	
 	uint64_t ucycles, kcycles;
@@ -1072,7 +1071,7 @@
 	order_suffix(ucycles1 - ucycles0, &ucycles, &usuffix);
 	order_suffix(kcycles1 - kcycles0, &kcycles, &ksuffix);
-		
+	
 	printf("Time: %" PRIu64 "%c user cycles, %" PRIu64 "%c kernel cycles\n",
-			ucycles, usuffix, kcycles, ksuffix);
+	    ucycles, usuffix, kcycles, ksuffix);
 	
 	if (ret == NULL) {
@@ -1080,5 +1079,5 @@
 		return true;
 	}
-
+	
 	printf("%s\n", ret);
 	return false;
@@ -1106,10 +1105,8 @@
 		/* Update and read thread accounting
 		   for benchmarking */
-		ipl_t ipl = interrupts_disable();
-		spinlock_lock(&TASK->lock);
+		irq_spinlock_lock(&TASK->lock, true);
 		uint64_t ucycles0, kcycles0;
 		task_get_accounting(TASK, &ucycles0, &kcycles0);
-		spinlock_unlock(&TASK->lock);
-		interrupts_restore(ipl);
+		irq_spinlock_unlock(&TASK->lock, true);
 		
 		/* Execute the test */
@@ -1118,11 +1115,9 @@
 		
 		/* Update and read thread accounting */
-		ipl = interrupts_disable();
-		spinlock_lock(&TASK->lock);
+		irq_spinlock_lock(&TASK->lock, true);
 		uint64_t ucycles1, kcycles1;
 		task_get_accounting(TASK, &ucycles1, &kcycles1);
-		spinlock_unlock(&TASK->lock);
-		interrupts_restore(ipl);
-
+		irq_spinlock_unlock(&TASK->lock, true);
+		
 		if (ret != NULL) {
 			printf("%s\n", ret);
@@ -1135,5 +1130,5 @@
 		order_suffix(kcycles1 - kcycles0, &kcycles, &ksuffix);
 		printf("OK (%" PRIu64 "%c user cycles, %" PRIu64 "%c kernel cycles)\n",
-				ucycles, usuffix, kcycles, ksuffix);
+		    ucycles, usuffix, kcycles, ksuffix);
 	}
 	
Index: kernel/generic/src/console/console.c
===================================================================
--- kernel/generic/src/console/console.c	(revision 4ce914d4d867104231d15513fe8669e434fea7b2)
+++ kernel/generic/src/console/console.c	(revision 5df79286ec53ba587ac1719375829cb7f78acfe9)
@@ -62,10 +62,14 @@
 /** Kernel log initialized */
 static bool klog_inited = false;
+
 /** First kernel log characters */
 static size_t klog_start = 0;
+
 /** Number of valid kernel log characters */
 static size_t klog_len = 0;
+
 /** Number of stored (not printed) kernel log characters */
 static size_t klog_stored = 0;
+
 /** Number of stored kernel log characters for uspace */
 static size_t klog_uspace = 0;
@@ -84,6 +88,6 @@
 };
 
-static void stdout_write(outdev_t *dev, wchar_t ch, bool silent);
-static void stdout_redraw(outdev_t *dev);
+static void stdout_write(outdev_t *, wchar_t, bool);
+static void stdout_redraw(outdev_t *);
 
 static outdev_operations_t stdout_ops = {
@@ -174,7 +178,10 @@
 		stdout->op->redraw(stdout);
 	
-	/* Force the console to print the prompt */
-	if ((stdin) && (prev))
+	if ((stdin) && (prev)) {
+		/*
+		 * Force the console to print the prompt.
+		 */
 		indev_push_character(stdin, '\n');
+	}
 }
 
