Index: kernel/generic/include/arch.h
===================================================================
--- kernel/generic/include/arch.h	(revision f0fcb040f13a5e81a4e704790bcd3b6fc4fe52cb)
+++ kernel/generic/include/arch.h	(revision 09737cc97ffcee4a01bd7eaee34d72d7821ae8c6)
@@ -38,4 +38,5 @@
 #include <arch/arch.h>  /* arch_pre_main() */
 #include <arch/asm.h>   /* get_stack_base() */
+#include <config.h>
 
 
@@ -69,4 +70,7 @@
 typedef struct {
 	size_t preemption;     /**< Preemption disabled counter and flag. */
+#ifdef RCU_PREEMPT_A
+	size_t rcu_nesting;    /**< RCU nesting count and flag. */
+#endif 
 	struct thread *thread; /**< Current thread. */
 	struct task *task;     /**< Current task. */
Index: kernel/generic/include/synch/rcu.h
===================================================================
--- kernel/generic/include/synch/rcu.h	(revision f0fcb040f13a5e81a4e704790bcd3b6fc4fe52cb)
+++ kernel/generic/include/synch/rcu.h	(revision 09737cc97ffcee4a01bd7eaee34d72d7821ae8c6)
@@ -123,4 +123,34 @@
 extern void _rcu_synchronize(bool expedite);
 
+
+#ifdef RCU_PREEMPT_A
+
+#define RCU_CNT_INC       (1 << 1)
+#define RCU_WAS_PREEMPTED (1 << 0)
+
+/* Fwd. decl. because of inlining. */
+void _rcu_preempted_unlock(void);
+
+/** Delimits the start of an RCU reader critical section. 
+ * 
+ * Reader sections may be nested and are preemptable. You must not
+ * however block/sleep within reader sections.
+ */
+static inline void rcu_read_lock(void)
+{
+	THE->rcu_nesting += RCU_CNT_INC;
+}
+
+/** Delimits the end of an RCU reader critical section. */
+static inline void rcu_read_unlock(void)
+{
+	THE->rcu_nesting -= RCU_CNT_INC;
+	
+	if (RCU_WAS_PREEMPTED == THE->rcu_nesting) {
+		_rcu_preempted_unlock();
+	}
+}
+
+#elif defined(RCU_PREEMPT_PODZIMEK)
 
 /* Fwd decl. required by the inlined implementation. Not part of public API. */
@@ -210,8 +240,8 @@
 	preemption_enable();
 }
-
-
 #endif
 
+#endif
+
 /** @}
  */
Index: kernel/generic/include/synch/rcu_types.h
===================================================================
--- kernel/generic/include/synch/rcu_types.h	(revision f0fcb040f13a5e81a4e704790bcd3b6fc4fe52cb)
+++ kernel/generic/include/synch/rcu_types.h	(revision 09737cc97ffcee4a01bd7eaee34d72d7821ae8c6)
@@ -39,4 +39,9 @@
 #include <synch/semaphore.h>
 
+#if !defined(RCU_PREEMPT_PODZIMEK) && !defined(RCU_PREEMPT_A)
+#define RCU_PREEMPT_A
+//#error You must select an RCU algorithm.
+#endif
+
 
 /* Fwd decl. */
@@ -58,7 +63,19 @@
 /** RCU related per-cpu data. */
 typedef struct rcu_cpu_data {
-	/** The cpu recorded a quiescent state last time during this grace period */
+	/** The cpu recorded a quiescent state last time during this grace period.*/
 	rcu_gp_t last_seen_gp;
+
+#ifdef RCU_PREEMPT_PODZIMEK
+	/** This cpu has not yet passed a quiescent state and it is delaying the
+	 * detector. Once it reaches a QS it must sema_up(rcu.remaining_readers).
+	 */
+	bool is_delaying_gp;
 	
+	/** True if we should signal the detector that we exited a reader section.
+	 * 
+	 * Equal to (THREAD->rcu.was_preempted || CPU->rcu.is_delaying_gp).
+	 */
+	bool signal_unlock;
+
 	/** The number of times an RCU reader section is nested on this cpu. 
 	 * 
@@ -68,5 +85,6 @@
 	 */
 	size_t nesting_cnt;
-
+#endif
+	
 	/** Callbacks to invoke once the current grace period ends, ie cur_cbs_gp.
 	 * Accessed by the local reclaimer only.
@@ -102,15 +120,4 @@
 	rcu_gp_t next_cbs_gp;
 	
-	/** This cpu has not yet passed a quiescent state and it is delaying the
-	 * detector. Once it reaches a QS it must sema_up(rcu.remaining_readers).
-	 */
-	bool is_delaying_gp;
-	
-	/** True if we should signal the detector that we exited a reader section.
-	 * 
-	 * Equal to (THREAD->rcu.was_preempted || CPU->rcu.is_delaying_gp).
-	 */
-	bool signal_unlock;
-	
 	/** Positive if there are callbacks pending in arriving_cbs. */
 	semaphore_t arrived_flag;
@@ -142,4 +149,6 @@
 	 */
 	size_t nesting_cnt;
+
+#ifdef RCU_PREEMPT_PODZIMEK
 	
 	/** True if the thread was preempted in a reader section. 
@@ -151,4 +160,6 @@
 	 */
 	bool was_preempted;
+#endif
+	
 	/** Preempted threads link. Access with rcu.prempt_lock.*/
 	link_t preempt_link;
