Index: kernel/arch/mips32/src/interrupt.c
===================================================================
--- kernel/arch/mips32/src/interrupt.c	(revision b3f8fb771f871e7f2bb35ce9339717639e8f86d6)
+++ kernel/arch/mips32/src/interrupt.c	(revision d8d542eaa92d9ef9f891917bf85c04abc6ef0751)
@@ -114,5 +114,12 @@
 	nextcount = cp0_count_read() + cp0_compare_value - drift;
 	cp0_compare_write(nextcount);
+
+	/*
+	 * We are holding a lock which prevents preemption.
+	 * Release the lock, call clock() and reacquire the lock again.
+	 */
+	spinlock_unlock(&irq->lock);
 	clock();
+	spinlock_lock(&irq->lock);
 	
 	if (virtual_timer_fnc != NULL)
