Index: kernel/generic/src/proc/scheduler.c
===================================================================
--- kernel/generic/src/proc/scheduler.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ kernel/generic/src/proc/scheduler.c	(revision 4e7d3ddd4328fe3267c82cfe75beaf6ec8ff846d)
@@ -63,7 +63,4 @@
 #include <debug.h>
 
-static void before_task_runs(void);
-static void before_thread_runs(void);
-static void after_thread_ran(void);
 static void scheduler_separated_stack(void);
 
@@ -71,5 +68,5 @@
 
 /** Carry out actions before new task runs. */
-void before_task_runs(void)
+static void before_task_runs(void)
 {
 	before_task_runs_arch();
@@ -85,7 +82,8 @@
  *
  */
-void before_thread_runs(void)
+static void before_thread_runs(void)
 {
 	before_thread_runs_arch();
+	
 #ifdef CONFIG_FPU_LAZY
 	if(THREAD == CPU->fpu_owner)
@@ -113,5 +111,5 @@
  *
  */
-void after_thread_ran(void)
+static void after_thread_ran(void)
 {
 	after_thread_ran_arch();
@@ -391,5 +389,4 @@
 	 * possible destruction should thread_destroy() be called on this or any
 	 * other processor while the scheduler is still using them.
-	 *
 	 */
 	if (old_task)
@@ -417,10 +414,8 @@
 				 * The thread structure is kept allocated until
 				 * somebody calls thread_detach() on it.
-				 *
 				 */
 				if (!irq_spinlock_trylock(&THREAD->join_wq.lock)) {
 					/*
 					 * Avoid deadlock.
-					 *
 					 */
 					irq_spinlock_unlock(&THREAD->lock, false);
@@ -443,5 +438,4 @@
 			/*
 			 * Prefer the thread after it's woken up.
-			 *
 			 */
 			THREAD->priority = -1;
@@ -451,5 +445,4 @@
 			 * waitq_sleep(). Address of wq->lock is kept in
 			 * THREAD->sleep_queue.
-			 *
 			 */
 			irq_spinlock_unlock(&THREAD->sleep_queue->lock, false);
@@ -461,5 +454,4 @@
 			/*
 			 * Entering state is unexpected.
-			 *
 			 */
 			panic("tid%" PRIu64 ": unexpected state %s.",
@@ -480,7 +472,6 @@
 	
 	/*
-	 * If both the old and the new task are the same, lots of work is
-	 * avoided.
-	 *
+	 * If both the old and the new task are the same,
+	 * lots of work is avoided.
 	 */
 	if (TASK != THREAD->task) {
@@ -488,7 +479,6 @@
 		
 		/*
-		 * Note that it is possible for two tasks to share one address
-		 * space.
-		 (
+		 * Note that it is possible for two tasks
+		 * to share one address space.
 		 */
 		if (old_as != new_as) {
@@ -496,5 +486,4 @@
 			 * Both tasks and address spaces are different.
 			 * Replace the old one with the new one.
-			 *
 			 */
 			as_switch(old_as, new_as);
@@ -527,5 +516,4 @@
 	 * necessary, is to be mapped in before_thread_runs(). This
 	 * function must be executed before the switch to the new stack.
-	 *
 	 */
 	before_thread_runs();
@@ -534,5 +522,4 @@
 	 * Copy the knowledge of CPU, TASK, THREAD and preemption counter to
 	 * thread's stack.
-	 *
 	 */
 	the_copy(THE, (the_t *) THREAD->kstack);
