Index: kernel/generic/src/synch/rcu.c
===================================================================
--- kernel/generic/src/synch/rcu.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
+++ kernel/generic/src/synch/rcu.c	(revision a35b458e9db1ca95e679799dc7c1b12c83359ca3)
@@ -26,6 +26,6 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
- 
- 
+
+
 /** @addtogroup sync
  * @{
@@ -182,5 +182,5 @@
 	 */
 	rcu_gp_t completed_gp;
-	
+
 	/** Protects the following 3 fields. */
 	IRQ_SPINLOCK_DECLARE(preempt_lock);
@@ -195,7 +195,7 @@
 	 */
 	bool preempt_blocking_det;
-	
+
 #ifdef RCU_PREEMPT_A
-	
+
 	/**
 	 * The detector waits on this semaphore for any preempted readers
@@ -205,5 +205,5 @@
 
 #elif defined(RCU_PREEMPT_PODZIMEK)
-	
+
 	/** Reclaimers notify the detector when they request more grace periods.*/
 	condvar_t req_gp_changed;
@@ -228,5 +228,5 @@
 	semaphore_t remaining_readers;
 #endif
-	
+
 	/** Excludes simultaneous rcu_barrier() calls. */
 	mutex_t barrier_mtx;
@@ -235,8 +235,8 @@
 	/** rcu_barrier() waits for the completion of barrier callbacks on this wq.*/
 	waitq_t barrier_wq;
-	
+
 	/** Interruptible attached detector thread pointer. */
 	thread_t *detector_thr;
-	
+
 	/* Some statistics. */
 	size_t stat_expedited_cnt;
@@ -305,10 +305,10 @@
 	_rcu_cur_gp = 0;
 	rcu.completed_gp = 0;
-	
+
 	irq_spinlock_initialize(&rcu.preempt_lock, "rcu.preempt_lock");
 	list_initialize(&rcu.cur_preempted);
 	list_initialize(&rcu.next_preempted);
 	rcu.preempt_blocking_det = false;
-	
+
 	mutex_initialize(&rcu.barrier_mtx, MUTEX_PASSIVE);
 	atomic_set(&rcu.barrier_wait_cnt, 0);
@@ -316,15 +316,15 @@
 
 	semaphore_initialize(&rcu.remaining_readers, 0);
-	
+
 #ifdef RCU_PREEMPT_PODZIMEK
 	condvar_initialize(&rcu.req_gp_changed);
-	
+
 	rcu.req_gp_end_cnt = 0;
 	rcu.req_expedited_cnt = 0;
 	atomic_set(&rcu.delaying_cpu_cnt, 0);
 #endif
-	
+
 	rcu.detector_thr = NULL;
-	
+
 	rcu.stat_expedited_cnt = 0;
 	rcu.stat_delayed_cnt = 0;
@@ -347,5 +347,5 @@
 	CPU->rcu.signal_unlock = false;
 #endif
-	
+
 	CPU->rcu.cur_cbs = NULL;
 	CPU->rcu.cur_cbs_cnt = 0;
@@ -358,5 +358,5 @@
 	CPU->rcu.cur_cbs_gp = 0;
 	CPU->rcu.next_cbs_gp = 0;
-	
+
 	semaphore_initialize(&CPU->rcu.arrived_flag, 0);
 
@@ -364,5 +364,5 @@
 	if (config.cpu_active == 1)
 		CPU->rcu.reclaimer_thr = NULL;
-	
+
 	CPU->rcu.stat_max_cbs = 0;
 	CPU->rcu.stat_avg_cbs = 0;
@@ -379,5 +379,5 @@
 	start_detector();
 #endif
-	
+
 	start_reclaimers();
 }
@@ -391,5 +391,5 @@
 	thread->rcu.was_preempted = false;
 #endif
-	
+
 	link_initialize(&thread->rcu.preempt_link);
 }
@@ -406,5 +406,5 @@
 	for (unsigned int cpu_id = 0; cpu_id < config.cpu_active; ++cpu_id) {
 		assert(cpus[cpu_id].rcu.reclaimer_thr != NULL);
-	
+
 		if (cpus[cpu_id].rcu.reclaimer_thr) {
 			thread_interrupt(cpus[cpu_id].rcu.reclaimer_thr);
@@ -432,5 +432,5 @@
 	uint64_t completed = rcu.completed_gp;
 	spinlock_unlock(&rcu.gp_lock);
-	
+
 	return completed;
 }
@@ -441,7 +441,7 @@
 	for (unsigned int cpu_id = 0; cpu_id < config.cpu_count; ++cpu_id) {
 		char name[THREAD_NAME_BUFLEN] = {0};
-		
+
 		snprintf(name, THREAD_NAME_BUFLEN - 1, "rcu-rec/%u", cpu_id);
-		
+
 		cpus[cpu_id].rcu.reclaimer_thr =
 			thread_create(reclaimer, NULL, TASK, THREAD_FLAG_NONE, name);
@@ -462,8 +462,8 @@
 	rcu.detector_thr =
 		thread_create(detector, NULL, TASK, THREAD_FLAG_NONE, "rcu-det");
-	
+
 	if (!rcu.detector_thr)
 		panic("Failed to create RCU detector thread.");
-	
+
 	thread_ready(rcu.detector_thr);
 }
@@ -475,5 +475,5 @@
 	bool locked = 0 < CPU->rcu.nesting_cnt;
 	preemption_enable();
-	
+
 	return locked;
 }
@@ -489,8 +489,8 @@
 {
 	assert(PREEMPTION_DISABLED || interrupts_disabled());
-	
+
 	if (0 == --(*pnesting_cnt)) {
 		_rcu_record_qs();
-		
+
 		/*
 		 * The thread was preempted while in a critical section or
@@ -511,5 +511,5 @@
 {
 	assert(PREEMPTION_DISABLED || interrupts_disabled());
-	
+
 	/*
 	 * If an interrupt occurs here (even a NMI) it may beat us to
@@ -517,5 +517,5 @@
 	 * for us.
 	 */
-	
+
 	/*
 	 * If the detector is eagerly waiting for this cpu's reader to unlock,
@@ -525,5 +525,5 @@
 		semaphore_up(&rcu.remaining_readers);
 	}
-	
+
 	/*
 	 * This reader was preempted while in a reader section.
@@ -536,5 +536,5 @@
 		rm_preempted_reader();
 	}
-	
+
 	/* If there was something to signal to the detector we have done so. */
 	CPU->rcu.signal_unlock = false;
@@ -565,5 +565,5 @@
 	/* Calling from a reader section will deadlock. */
 	assert(!rcu_read_locked());
-	
+
 	synch_item_t completion;
 
@@ -589,5 +589,5 @@
 	 */
 	mutex_lock(&rcu.barrier_mtx);
-	
+
 	/*
 	 * Ensure we queue a barrier callback on all cpus before the already
@@ -598,13 +598,13 @@
 	DEFINE_CPU_MASK(cpu_mask);
 	cpu_mask_active(cpu_mask);
-	
+
 	cpu_mask_for_each(*cpu_mask, cpu_id) {
 		smp_call(cpu_id, add_barrier_cb, NULL);
 	}
-	
+
 	if (0 < atomic_predec(&rcu.barrier_wait_cnt)) {
 		waitq_sleep(&rcu.barrier_wq);
 	}
-	
+
 	mutex_unlock(&rcu.barrier_mtx);
 }
@@ -659,8 +659,8 @@
 {
 	assert(rcu_item);
-	
+
 	rcu_item->func = func;
 	rcu_item->next = NULL;
-	
+
 	preemption_disable();
 
@@ -670,19 +670,19 @@
 		= local_atomic_exchange(&r->parriving_cbs_tail, &rcu_item->next);
 	*prev_tail = rcu_item;
-	
+
 	/* Approximate the number of callbacks present. */
 	++r->arriving_cbs_cnt;
-	
+
 	if (expedite) {
 		r->expedite_arriving = true;
 	}
-	
+
 	bool first_cb = (prev_tail == &CPU->rcu.arriving_cbs);
-	
+
 	/* Added first callback - notify the reclaimer. */
 	if (first_cb && !semaphore_count_get(&r->arrived_flag)) {
 		semaphore_up(&r->arrived_flag);
 	}
-	
+
 	preemption_enable();
 }
@@ -725,12 +725,12 @@
 	rcu_gp_t last_compl_gp = 0;
 	bool ok = true;
-	
+
 	while (ok && wait_for_pending_cbs()) {
 		assert(CPU->rcu.reclaimer_thr == THREAD);
-		
+
 		exec_completed_cbs(last_compl_gp);
 
 		bool expedite = advance_cbs();
-		
+
 		ok = wait_for_cur_cbs_gp_end(expedite, &last_compl_gp);
 	}
@@ -744,9 +744,9 @@
 
 	bool ok = true;
-	
+
 	while (arriving_cbs_empty() && ok) {
 		ok = semaphore_down_interruptable(&CPU->rcu.arrived_flag);
 	}
-	
+
 	return ok;
 }
@@ -763,11 +763,11 @@
 {
 	upd_stat_missed_gp(last_completed_gp);
-	
+
 	/* Both next_cbs and cur_cbs GP elapsed. */
 	if (CPU->rcu.next_cbs_gp <= last_completed_gp) {
 		assert(CPU->rcu.cur_cbs_gp <= CPU->rcu.next_cbs_gp);
-		
+
 		size_t exec_cnt = CPU->rcu.cur_cbs_cnt + CPU->rcu.next_cbs_cnt;
-		
+
 		if (exec_cnt < CRITICAL_THRESHOLD) {
 			exec_cbs(&CPU->rcu.cur_cbs);
@@ -784,5 +784,5 @@
 			preemption_enable();
 		}
-		
+
 		CPU->rcu.cur_cbs_cnt = 0;
 		CPU->rcu.next_cbs_cnt = 0;
@@ -815,10 +815,10 @@
 		rcu_item_t *next = rcu_item->next;
 		rcu_func_t func = rcu_item->func;
-		
+
 		func(rcu_item);
-		
+
 		rcu_item = next;
 	}
-	
+
 	*phead = NULL;
 }
@@ -843,10 +843,10 @@
 	CPU->rcu.cur_cbs_cnt = CPU->rcu.next_cbs_cnt;
 	CPU->rcu.cur_cbs_gp = CPU->rcu.next_cbs_gp;
-	
+
 	/* Move arriving_cbs to next_cbs. */
-	
+
 	CPU->rcu.next_cbs_cnt = CPU->rcu.arriving_cbs_cnt;
 	CPU->rcu.arriving_cbs_cnt = 0;
-	
+
 	/*
 	 * Too many callbacks queued. Better speed up the detection
@@ -859,5 +859,5 @@
 	/* Start moving the arriving_cbs list to next_cbs. */
 	CPU->rcu.next_cbs = CPU->rcu.arriving_cbs;
-	
+
 	/*
 	 * At least one callback arrived. The tail therefore does not point
@@ -866,5 +866,5 @@
 	if (CPU->rcu.next_cbs) {
 		assert(CPU->rcu.parriving_cbs_tail != &CPU->rcu.arriving_cbs);
-		
+
 		CPU->rcu.arriving_cbs = NULL;
 		/* Reset arriving_cbs before updating the tail pointer. */
@@ -883,5 +883,5 @@
 	/* Update statistics of arrived callbacks. */
 	upd_stat_cb_cnts(CPU->rcu.next_cbs_cnt);
-	
+
 	/*
 	 * Make changes prior to queuing next_cbs visible to readers.
@@ -891,11 +891,11 @@
 
 	/* At the end of next_cbs_gp, exec next_cbs. Determine what GP that is. */
-	
+
 	if (!next_cbs_empty()) {
 		spinlock_lock(&rcu.gp_lock);
-	
+
 		/* Exec next_cbs at the end of the next GP. */
 		CPU->rcu.next_cbs_gp = _rcu_cur_gp + 1;
-		
+
 		/*
 		 * There are no callbacks to invoke before next_cbs. Instruct
@@ -908,12 +908,12 @@
 			CPU->rcu.cur_cbs_gp = rcu.completed_gp + 1;
 		}
-		
+
 		spinlock_unlock(&rcu.gp_lock);
 	} else {
 		CPU->rcu.next_cbs_gp = CPU->rcu.cur_cbs_gp;
 	}
-	
+
 	assert(CPU->rcu.cur_cbs_gp <= CPU->rcu.next_cbs_gp);
-	
+
 	return expedite;
 }
@@ -936,5 +936,5 @@
 	assert(CPU->rcu.cur_cbs_gp <= CPU->rcu.next_cbs_gp);
 	assert(CPU->rcu.cur_cbs_gp <= _rcu_cur_gp + 1);
-	
+
 	while (rcu.completed_gp < CPU->rcu.cur_cbs_gp) {
 		/* GP has not yet started - start a new one. */
@@ -952,12 +952,12 @@
 		} else {
 			/* GP detection is in progress.*/
-			
+
 			if (expedite)
 				condvar_signal(&rcu.expedite_now);
-			
+
 			/* Wait for the GP to complete. */
 			errno_t ret = _condvar_wait_timeout_spinlock(&rcu.gp_ended, &rcu.gp_lock,
 				SYNCH_NO_TIMEOUT, SYNCH_FLAGS_INTERRUPTIBLE);
-			
+
 			if (ret == EINTR) {
 				spinlock_unlock(&rcu.gp_lock);
@@ -966,10 +966,10 @@
 		}
 	}
-	
+
 	upd_missed_gp_in_wait(rcu.completed_gp);
-	
+
 	*completed_gp = rcu.completed_gp;
 	spinlock_unlock(&rcu.gp_lock);
-	
+
 	return true;
 }
@@ -978,22 +978,22 @@
 {
 	DEFINE_CPU_MASK(reader_cpus);
-	
+
 	cpu_mask_active(reader_cpus);
 	rm_quiescent_cpus(reader_cpus);
-	
+
 	while (!cpu_mask_is_none(reader_cpus)) {
 		/* Give cpus a chance to context switch (a QS) and batch callbacks. */
 		if(!gp_sleep(&expedite))
 			return false;
-		
+
 		rm_quiescent_cpus(reader_cpus);
 		sample_cpus(reader_cpus, reader_cpus);
 	}
-	
+
 	/* Update statistic. */
 	if (expedite) {
 		++rcu.stat_expedited_cnt;
 	}
-	
+
 	/*
 	 * All cpus have passed through a QS and see the most recent _rcu_cur_gp.
@@ -1032,9 +1032,9 @@
 	assert(interrupts_disabled());
 	cpu_mask_t *reader_cpus = (cpu_mask_t *)arg;
-	
+
 	bool locked = RCU_CNT_INC <= THE->rcu_nesting;
 	/* smp_call machinery makes the most current _rcu_cur_gp visible. */
 	bool passed_qs = (CPU->rcu.last_seen_gp == _rcu_cur_gp);
-		
+
 	if (locked && !passed_qs) {
 		/*
@@ -1062,5 +1062,5 @@
 	 */
 	size_t nesting_cnt = local_atomic_exchange(&THE->rcu_nesting, 0);
-	
+
 	/*
 	 * Ensures NMIs see .rcu_nesting without the WAS_PREEMPTED mark and
@@ -1068,5 +1068,5 @@
 	 */
 	compiler_barrier();
-	
+
 	/* Preempted a reader critical section for the first time. */
 	if (RCU_CNT_INC <= nesting_cnt && !(nesting_cnt & RCU_WAS_PREEMPTED)) {
@@ -1074,5 +1074,5 @@
 		note_preempted_reader();
 	}
-	
+
 	/* Save the thread's nesting count when it is not running. */
 	THREAD->rcu.nesting_cnt = nesting_cnt;
@@ -1110,5 +1110,5 @@
 		THREAD->priority = -1;
 	}
-	
+
 	upd_max_cbs_in_slice(CPU->rcu.arriving_cbs_cnt);
 }
@@ -1118,5 +1118,5 @@
 {
 	assert(!rcu_read_locked());
-	
+
 	/* Load the thread's saved nesting count from before it was preempted. */
 	THE->rcu_nesting = THREAD->rcu.nesting_cnt;
@@ -1131,5 +1131,5 @@
 {
 	assert(THE->rcu_nesting == 0);
-	
+
 	/*
 	 * The thread forgot to exit its reader critical section.
@@ -1159,5 +1159,5 @@
 {
 	assert(0 == THE->rcu_nesting || RCU_WAS_PREEMPTED == THE->rcu_nesting);
-	
+
 	size_t prev = local_atomic_exchange(&THE->rcu_nesting, 0);
 	if (prev == RCU_WAS_PREEMPTED) {
@@ -1212,7 +1212,7 @@
 		return true;
 	}
-	
+
 	spinlock_lock(&rcu.gp_lock);
-	
+
 	if (CPU->rcu.cur_cbs_gp <= rcu.completed_gp) {
 		*completed_gp = rcu.completed_gp;
@@ -1220,8 +1220,8 @@
 		return true;
 	}
-	
+
 	assert(CPU->rcu.cur_cbs_gp <= CPU->rcu.next_cbs_gp);
 	assert(_rcu_cur_gp <= CPU->rcu.cur_cbs_gp);
-	
+
 	/*
 	 * Notify the detector of how many GP ends we intend to wait for, so
@@ -1231,5 +1231,5 @@
 	size_t remaining_gp_ends = (size_t) (CPU->rcu.next_cbs_gp - _rcu_cur_gp);
 	req_detection(remaining_gp_ends + (arriving_cbs_empty() ? 0 : 1));
-	
+
 	/*
 	 * Ask the detector to speed up GP detection if there are too many
@@ -1239,5 +1239,5 @@
 		if(0 == rcu.req_expedited_cnt)
 			condvar_signal(&rcu.expedite_now);
-		
+
 		/*
 		 * Expedite only cub_cbs. If there really is a surge of callbacks
@@ -1250,11 +1250,11 @@
 	/* Wait for cur_cbs_gp to end. */
 	bool interrupted = cv_wait_for_gp(CPU->rcu.cur_cbs_gp);
-	
+
 	*completed_gp = rcu.completed_gp;
 	spinlock_unlock(&rcu.gp_lock);
-	
+
 	if (!interrupted)
 		upd_missed_gp_in_wait(*completed_gp);
-	
+
 	return !interrupted;
 }
@@ -1264,7 +1264,7 @@
 {
 	assert(spinlock_locked(&rcu.gp_lock));
-	
+
 	bool interrupted = false;
-	
+
 	/* Wait until wait_on_gp ends. */
 	while (rcu.completed_gp < wait_on_gp && !interrupted) {
@@ -1273,5 +1273,5 @@
 		interrupted = (ret == EINTR);
 	}
-	
+
 	return interrupted;
 }
@@ -1296,5 +1296,5 @@
 {
 	spinlock_lock(&rcu.gp_lock);
-	
+
 	while (wait_for_detect_req()) {
 		/*
@@ -1303,10 +1303,10 @@
 		 */
 		start_new_gp();
-		
+
 		spinlock_unlock(&rcu.gp_lock);
-		
+
 		if (!wait_for_readers())
 			goto unlocked_out;
-		
+
 		spinlock_lock(&rcu.gp_lock);
 
@@ -1314,7 +1314,7 @@
 		end_cur_gp();
 	}
-	
+
 	spinlock_unlock(&rcu.gp_lock);
-	
+
 unlocked_out:
 	return;
@@ -1325,14 +1325,14 @@
 {
 	assert(spinlock_locked(&rcu.gp_lock));
-	
+
 	bool interrupted = false;
-	
+
 	while (0 == rcu.req_gp_end_cnt && !interrupted) {
 		int ret = _condvar_wait_timeout_spinlock(&rcu.req_gp_changed,
 			&rcu.gp_lock, SYNCH_NO_TIMEOUT, SYNCH_FLAGS_INTERRUPTIBLE);
-		
+
 		interrupted = (ret == EINTR);
 	}
-	
+
 	return !interrupted;
 }
@@ -1342,8 +1342,8 @@
 {
 	assert(spinlock_locked(&rcu.gp_lock));
-	
+
 	rcu.completed_gp = _rcu_cur_gp;
 	--rcu.req_gp_end_cnt;
-	
+
 	condvar_broadcast(&rcu.gp_ended);
 }
@@ -1353,5 +1353,5 @@
 {
 	DEFINE_CPU_MASK(reading_cpus);
-	
+
 	/* All running cpus have potential readers. */
 	cpu_mask_active(reading_cpus);
@@ -1363,11 +1363,11 @@
 	if (!gp_sleep())
 		return false;
-	
+
 	/* Non-intrusively determine which cpus have yet to pass a QS. */
 	rm_quiescent_cpus(reading_cpus);
-	
+
 	/* Actively interrupt cpus delaying the current GP and demand a QS. */
 	interrupt_delaying_cpus(reading_cpus);
-	
+
 	/* Wait for the interrupted cpus to notify us that they reached a QS. */
 	if (!wait_for_delaying_cpus())
@@ -1378,9 +1378,9 @@
 	 * monotonically descreases.
 	 */
-	
+
 	/* Wait for the last reader in cur_preempted to notify us it is done. */
 	if (!wait_for_preempt_reader())
 		return false;
-	
+
 	return true;
 }
@@ -1397,5 +1397,5 @@
 			DETECT_SLEEP_MS * 1000, SYNCH_FLAGS_INTERRUPTIBLE);
 	}
-	
+
 	if (0 < rcu.req_expedited_cnt) {
 		--rcu.req_expedited_cnt;
@@ -1403,7 +1403,7 @@
 		++rcu.stat_expedited_cnt;
 	}
-	
+
 	spinlock_unlock(&rcu.gp_lock);
-	
+
 	return (ret != EINTR);
 }
@@ -1413,5 +1413,5 @@
 {
 	atomic_set(&rcu.delaying_cpu_cnt, 0);
-	
+
 	sample_cpus(cpu_mask, NULL);
 }
@@ -1426,5 +1426,5 @@
 	assert(interrupts_disabled());
 	assert(!CPU->rcu.is_delaying_gp);
-	
+
 	/* Cpu did not pass a quiescent state yet. */
 	if (CPU->rcu.last_seen_gp != _rcu_cur_gp) {
@@ -1440,5 +1440,5 @@
 			ACCESS_ONCE(CPU->rcu.is_delaying_gp) = true;
 			CPU->rcu.signal_unlock = true;
-			
+
 			atomic_inc(&rcu.delaying_cpu_cnt);
 		} else {
@@ -1466,5 +1466,5 @@
 		 */
 	}
-	
+
 	/*
 	 * smp_call() makes sure any changes propagate back to the caller.
@@ -1483,8 +1483,8 @@
 			return false;
 	}
-	
+
 	/* Update statistic. */
 	rcu.stat_delayed_cnt += delaying_cpu_cnt;
-	
+
 	return true;
 }
@@ -1506,8 +1506,8 @@
 	 */
 	compiler_barrier();
-	
+
 	/* Save the thread's nesting count when it is not running. */
 	THREAD->rcu.nesting_cnt = CPU->rcu.nesting_cnt;
-	
+
 	/* Preempted a reader critical section for the first time. */
 	if (0 < THREAD->rcu.nesting_cnt && !THREAD->rcu.was_preempted) {
@@ -1515,5 +1515,5 @@
 		note_preempted_reader();
 	}
-	
+
 	/*
 	 * The preempted reader has been noted globally. There are therefore
@@ -1528,5 +1528,5 @@
 	 */
 	CPU->rcu.nesting_cnt = 0;
-	
+
 	/*
 	 * This cpu is holding up the current GP. Let the detector know
@@ -1553,5 +1553,5 @@
 		THREAD->priority = -1;
 	}
-	
+
 	upd_max_cbs_in_slice(CPU->rcu.arriving_cbs_cnt);
 }
@@ -1562,8 +1562,8 @@
 	assert(PREEMPTION_DISABLED || interrupts_disabled());
 	assert(0 == CPU->rcu.nesting_cnt);
-	
+
 	/* Load the thread's saved nesting count from before it was preempted. */
 	CPU->rcu.nesting_cnt = THREAD->rcu.nesting_cnt;
-	
+
 	/*
 	 * Ensures NMI see the proper nesting count before .signal_unlock.
@@ -1572,5 +1572,5 @@
 	 */
 	compiler_barrier();
-	
+
 	/*
 	 * In the unlikely event that a NMI occurs between the loading of the
@@ -1594,5 +1594,5 @@
 	assert(THREAD->state == Exiting);
 	assert(PREEMPTION_DISABLED || interrupts_disabled());
-	
+
 	/*
 	 * The thread forgot to exit its reader critical section.
@@ -1617,10 +1617,10 @@
 {
 	assert(spinlock_locked(&rcu.gp_lock));
-	
+
 	irq_spinlock_lock(&rcu.preempt_lock, true);
-	
+
 	/* Start a new GP. Announce to readers that a quiescent state is needed. */
 	++_rcu_cur_gp;
-	
+
 	/*
 	 * Readers preempted before the start of this GP (next_preempted)
@@ -1632,5 +1632,5 @@
 	 */
 	list_concat(&rcu.cur_preempted, &rcu.next_preempted);
-	
+
 	irq_spinlock_unlock(&rcu.preempt_lock, true);
 }
@@ -1694,5 +1694,5 @@
 	 */
 	memory_barrier(); /* MB C */
-	
+
 	cpu_mask_for_each(*cpu_mask, cpu_id) {
 		/*
@@ -1707,5 +1707,5 @@
 		 */
 		bool cpu_acked_gp = (cpus[cpu_id].rcu.last_seen_gp == _rcu_cur_gp);
-		
+
 		/*
 		 * Either the cpu is idle or it is exiting away from idle mode
@@ -1714,5 +1714,5 @@
 		 */
 		bool cpu_idle = cpus[cpu_id].idle;
-		
+
 		if (cpu_acked_gp || cpu_idle) {
 			cpu_mask_reset(cpu_mask, cpu_id);
@@ -1736,5 +1736,5 @@
 {
 	assert(CPU->rcu.cur_cbs_gp <= completed_gp);
-	
+
 	size_t delta = (size_t)(completed_gp - CPU->rcu.cur_cbs_gp);
 	CPU->rcu.stat_missed_gp_in_wait += delta;
@@ -1764,5 +1764,5 @@
 {
 	irq_spinlock_lock(&rcu.preempt_lock, true);
-	
+
 	assert(link_used(&THREAD->rcu.preempt_link));
 
@@ -1793,14 +1793,14 @@
 	bool reader_exists = !list_empty(&rcu.cur_preempted);
 	rcu.preempt_blocking_det = reader_exists;
-	
+
 	irq_spinlock_unlock(&rcu.preempt_lock, true);
-	
+
 	if (reader_exists) {
 		/* Update statistic. */
 		++rcu.stat_preempt_blocking_cnt;
-		
+
 		return semaphore_down_interruptable(&rcu.remaining_readers);
 	}
-	
+
 	return true;
 }
@@ -1809,10 +1809,10 @@
 {
 	rcu_cpu_data_t *cr = &CPU->rcu;
-	
+
 	if (arriving_cbs_cnt > cr->last_arriving_cnt) {
 		size_t arrived_cnt = arriving_cbs_cnt - cr->last_arriving_cnt;
 		cr->stat_max_slice_cbs = max(arrived_cnt, cr->stat_max_slice_cbs);
 	}
-	
+
 	cr->last_arriving_cnt = arriving_cbs_cnt;
 }
@@ -1826,5 +1826,5 @@
 	 * are no locks to lock in order to get up-to-date values.
 	 */
-	
+
 #ifdef RCU_PREEMPT_PODZIMEK
 	const char *algo = "podzimek-preempt-rcu";
@@ -1832,5 +1832,5 @@
 	const char *algo = "a-preempt-rcu";
 #endif
-	
+
 	printf("Config: expedite_threshold=%d, critical_threshold=%d,"
 		" detect_sleep=%dms, %s\n",
@@ -1843,5 +1843,5 @@
 		"running or not)\n", rcu.stat_preempt_blocking_cnt);
 	printf("Smp calls:     %zu\n", rcu.stat_smp_call_cnt);
-	
+
 	printf("Max arrived callbacks per GP and CPU:\n");
 	for (unsigned int i = 0; i < config.cpu_count; ++i) {
@@ -1853,5 +1853,5 @@
 		printf(" %zu", cpus[i].rcu.stat_avg_cbs);
 	}
-	
+
 	printf("\nMax arrived callbacks per time slice and CPU:\n");
 	for (unsigned int i = 0; i < config.cpu_count; ++i) {
