Index: kernel/generic/src/synch/waitq.c
===================================================================
--- kernel/generic/src/synch/waitq.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
+++ kernel/generic/src/synch/waitq.c	(revision a35b458e9db1ca95e679799dc7c1b12c83359ca3)
@@ -94,12 +94,12 @@
 	bool do_wakeup = false;
 	DEADLOCK_PROBE_INIT(p_wqlock);
-	
+
 	irq_spinlock_lock(&threads_lock, false);
 	if (!thread_exists(thread))
 		goto out;
-	
+
 grab_locks:
 	irq_spinlock_lock(&thread->lock, false);
-	
+
 	waitq_t *wq;
 	if ((wq = thread->sleep_queue)) {  /* Assignment */
@@ -110,5 +110,5 @@
 			goto grab_locks;
 		}
-		
+
 		list_remove(&thread->wq_link);
 		thread->saved_context = thread->sleep_timeout_context;
@@ -117,11 +117,11 @@
 		irq_spinlock_unlock(&wq->lock, false);
 	}
-	
+
 	thread->timeout_pending = false;
 	irq_spinlock_unlock(&thread->lock, false);
-	
+
 	if (do_wakeup)
 		thread_ready(thread);
-	
+
 out:
 	irq_spinlock_unlock(&threads_lock, false);
@@ -144,13 +144,13 @@
 	bool do_wakeup = false;
 	DEADLOCK_PROBE_INIT(p_wqlock);
-	
+
 	/*
 	 * The thread is quaranteed to exist because
 	 * threads_lock is held.
 	 */
-	
+
 grab_locks:
 	irq_spinlock_lock(&thread->lock, false);
-	
+
 	waitq_t *wq;
 	if ((wq = thread->sleep_queue)) {  /* Assignment */
@@ -162,5 +162,5 @@
 			return;
 		}
-		
+
 		if (!irq_spinlock_trylock(&wq->lock)) {
 			/* Avoid deadlock */
@@ -169,9 +169,9 @@
 			goto grab_locks;
 		}
-		
+
 		if ((thread->timeout_pending) &&
 		    (timeout_unregister(&thread->sleep_timeout)))
 			thread->timeout_pending = false;
-		
+
 		list_remove(&thread->wq_link);
 		thread->saved_context = thread->sleep_interruption_context;
@@ -180,7 +180,7 @@
 		irq_spinlock_unlock(&wq->lock, false);
 	}
-	
+
 	irq_spinlock_unlock(&thread->lock, false);
-	
+
 	if (do_wakeup)
 		thread_ready(thread);
@@ -198,25 +198,25 @@
 {
 	irq_spinlock_lock(&wq->lock, true);
-	
+
 	if (!list_empty(&wq->sleepers)) {
 		thread_t *thread = list_get_instance(list_first(&wq->sleepers),
 		    thread_t, wq_link);
-		
+
 		irq_spinlock_lock(&thread->lock, false);
-		
+
 		assert(thread->sleep_interruptible);
-		
+
 		if ((thread->timeout_pending) &&
 		    (timeout_unregister(&thread->sleep_timeout)))
 			thread->timeout_pending = false;
-		
+
 		list_remove(&thread->wq_link);
 		thread->saved_context = thread->sleep_interruption_context;
 		thread->sleep_queue = NULL;
-		
+
 		irq_spinlock_unlock(&thread->lock, false);
 		thread_ready(thread);
 	}
-	
+
 	irq_spinlock_unlock(&wq->lock, true);
 }
@@ -271,5 +271,5 @@
 {
 	assert((!PREEMPTION_DISABLED) || (PARAM_NON_BLOCKING(flags, usec)));
-	
+
 	ipl_t ipl = waitq_sleep_prepare(wq);
 	bool nblocked;
@@ -296,8 +296,8 @@
 {
 	ipl_t ipl;
-	
+
 restart:
 	ipl = interrupts_disable();
-	
+
 	if (THREAD) {  /* Needed during system initiailzation */
 		/*
@@ -310,5 +310,5 @@
 		 */
 		irq_spinlock_lock(&THREAD->lock, false);
-		
+
 		if (THREAD->timeout_pending) {
 			irq_spinlock_unlock(&THREAD->lock, false);
@@ -316,8 +316,8 @@
 			goto restart;
 		}
-		
+
 		irq_spinlock_unlock(&THREAD->lock, false);
 	}
-	
+
 	irq_spinlock_lock(&wq->lock, false);
 	return ipl;
@@ -354,5 +354,5 @@
 		irq_spinlock_unlock(&wq->lock, false);
 	}
-	
+
 	interrupts_restore(ipl);
 }
@@ -387,5 +387,5 @@
 		}
 	}
-	
+
 	/*
 	 * Now we are firmly decided to go to sleep.
@@ -393,5 +393,5 @@
 	 */
 	irq_spinlock_lock(&THREAD->lock, false);
-	
+
 	if (flags & SYNCH_FLAGS_INTERRUPTIBLE) {
 		/*
@@ -403,5 +403,5 @@
 			return EINTR;
 		}
-		
+
 		/*
 		 * Set context that will be restored if the sleep
@@ -417,5 +417,5 @@
 	} else
 		THREAD->sleep_interruptible = false;
-	
+
 	if (usec) {
 		/* We use the timeout variant. */
@@ -426,12 +426,12 @@
 			return ETIMEOUT;
 		}
-		
+
 		THREAD->timeout_pending = true;
 		timeout_register(&THREAD->sleep_timeout, (uint64_t) usec,
 		    waitq_sleep_timed_out, THREAD);
 	}
-	
+
 	list_append(&THREAD->wq_link, &wq->sleepers);
-	
+
 	/*
 	 * Suspend execution.
@@ -440,15 +440,15 @@
 	THREAD->state = Sleeping;
 	THREAD->sleep_queue = wq;
-	
+
 	/* Must be before entry to scheduler, because there are multiple
 	 * return vectors.
 	 */
 	*blocked = true;
-	
+
 	irq_spinlock_unlock(&THREAD->lock, false);
-	
+
 	/* wq->lock is released in scheduler_separated_stack() */
 	scheduler();
-	
+
 	return EOK;
 }
@@ -511,5 +511,5 @@
 {
 	assert(interrupts_disabled());
-	
+
 	irq_spinlock_lock(&wq->lock, false);
 	irq_spinlock_unlock(&wq->lock, false);
@@ -536,5 +536,5 @@
 	assert(interrupts_disabled());
 	assert(irq_spinlock_locked(&wq->lock));
-	
+
 loop:
 	if (list_empty(&wq->sleepers)) {
@@ -542,12 +542,12 @@
 		if ((count) && (mode == WAKEUP_ALL))
 			wq->missed_wakeups--;
-		
+
 		return;
 	}
-	
+
 	count++;
 	thread_t *thread = list_get_instance(list_first(&wq->sleepers),
 	    thread_t, wq_link);
-	
+
 	/*
 	 * Lock the thread prior to removing it from the wq.
@@ -569,14 +569,14 @@
 	irq_spinlock_lock(&thread->lock, false);
 	list_remove(&thread->wq_link);
-	
+
 	if ((thread->timeout_pending) &&
 	    (timeout_unregister(&thread->sleep_timeout)))
 		thread->timeout_pending = false;
-	
+
 	thread->sleep_queue = NULL;
 	irq_spinlock_unlock(&thread->lock, false);
-	
+
 	thread_ready(thread);
-	
+
 	if (mode == WAKEUP_ALL)
 		goto loop;
