Index: kernel/generic/src/sysinfo/stats.c
===================================================================
--- kernel/generic/src/sysinfo/stats.c	(revision 6b6626d326965590a27f05bbec5599ed571e5d9e)
+++ kernel/generic/src/sysinfo/stats.c	(revision 6e121b8c6823b53d2588dac16ca12e517fea0c94)
@@ -38,4 +38,6 @@
 #include <sysinfo/stats.h>
 #include <sysinfo/sysinfo.h>
+#include <synch/spinlock.h>
+#include <synch/mutex.h>
 #include <time/clock.h>
 #include <mm/frame.h>
@@ -68,6 +70,6 @@
 static load_t avenrdy[LOAD_STEPS] = {0, 0, 0};
 
-/** Load calculation spinlock */
-SPINLOCK_STATIC_INITIALIZE_NAME(load_lock, "load_lock");
+/** Load calculation lock */
+static mutex_t load_lock;
 
 /** Get system uptime
@@ -344,5 +346,5 @@
 	
 	/* Interrupts are already disabled */
-	spinlock_lock(&(thread->lock));
+	spinlock_lock(&thread->lock);
 	
 	/* Record the statistics and increment the iterator */
@@ -350,5 +352,5 @@
 	(*iterator)++;
 	
-	spinlock_unlock(&(thread->lock));
+	spinlock_unlock(&thread->lock);
 	
 	return true;
@@ -615,7 +617,6 @@
 	}
 	
-	/* To always get consistent values acquire the spinlock */
-	ipl_t ipl = interrupts_disable();
-	spinlock_lock(&load_lock);
+	/* To always get consistent values acquire the mutex */
+	mutex_lock(&load_lock);
 	
 	unsigned int i;
@@ -623,6 +624,5 @@
 		stats_load[i] = avenrdy[i] << LOAD_FIXED_SHIFT;
 	
-	spinlock_unlock(&load_lock);
-	interrupts_restore(ipl);
+	mutex_unlock(&load_lock);
 	
 	return ((void *) stats_load);
@@ -655,6 +655,5 @@
 		
 		/* Mutually exclude with get_stats_load() */
-		ipl_t ipl = interrupts_disable();
-		spinlock_lock(&load_lock);
+		mutex_lock(&load_lock);
 		
 		unsigned int i;
@@ -662,6 +661,5 @@
 			avenrdy[i] = load_calc(avenrdy[i], load_exp[i], ready);
 		
-		spinlock_unlock(&load_lock);
-		interrupts_restore(ipl);
+		mutex_unlock(&load_lock);
 		
 		thread_sleep(LOAD_INTERVAL);
@@ -674,4 +672,6 @@
 void stats_init(void)
 {
+	mutex_initialize(&load_lock, MUTEX_PASSIVE);
+
 	sysinfo_set_item_fn_val("system.uptime", NULL, get_stats_uptime);
 	sysinfo_set_item_fn_data("system.cpus", NULL, get_stats_cpus);
