Index: kernel/generic/src/proc/scheduler.c
===================================================================
--- kernel/generic/src/proc/scheduler.c	(revision 8a64e81e7083acc3dc69cd56c21cca72dd37ca13)
+++ kernel/generic/src/proc/scheduler.c	(revision 9f8745c5331a919e144b6084cb90d7f5b2eaccba)
@@ -53,4 +53,5 @@
 #include <synch/spinlock.h>
 #include <synch/workqueue.h>
+#include <synch/rcu.h>
 #include <config.h>
 #include <context.h>
@@ -87,4 +88,5 @@
 {
 	before_thread_runs_arch();
+	rcu_before_thread_runs();
 	
 #ifdef CONFIG_FPU_LAZY
@@ -128,4 +130,5 @@
 {
 	workq_after_thread_ran();
+	rcu_after_thread_ran();
 	after_thread_ran_arch();
 }
@@ -220,4 +223,6 @@
 		goto loop;
 	}
+
+	ASSERT(!CPU->idle);
 	
 	unsigned int i;
@@ -422,4 +427,5 @@
 		
 		case Exiting:
+			rcu_thread_exiting();
 repeat:
 			if (THREAD->detached) {
Index: kernel/generic/src/proc/thread.c
===================================================================
--- kernel/generic/src/proc/thread.c	(revision 8a64e81e7083acc3dc69cd56c21cca72dd37ca13)
+++ kernel/generic/src/proc/thread.c	(revision 9f8745c5331a919e144b6084cb90d7f5b2eaccba)
@@ -47,4 +47,5 @@
 #include <synch/waitq.h>
 #include <synch/workqueue.h>
+#include <synch/rcu.h>
 #include <cpu.h>
 #include <str.h>
@@ -405,4 +406,6 @@
 	/* Might depend on previous initialization */
 	thread_create_arch(thread);
+	
+	rcu_thread_init(thread);
 	
 	if ((flags & THREAD_FLAG_NOATTACH) != THREAD_FLAG_NOATTACH)
