Index: src/proc/scheduler.c
===================================================================
--- src/proc/scheduler.c	(revision ac5d02b7ec81adf50a7070d07dc35f5f6df54639)
+++ src/proc/scheduler.c	(revision 70527f178e75c4d7b241a68de96deb60887233de)
@@ -57,4 +57,11 @@
 volatile int nrdy;
 
+
+/** Initialize context switching
+ *
+ * Initialize context switching and lazy FPU
+ * context switching.
+ *
+ */
 void before_thread_runs(void)
 {
@@ -64,4 +71,9 @@
 
 
+/** Initialize scheduler
+ *
+ * Initialize kernel scheduler.
+ *
+ */
 void scheduler_init(void)
 {
@@ -69,5 +81,14 @@
 }
 
-/* cpu_priority_high()'d */
+
+/** Get thread to be scheduled
+ *
+ * Get the optimal thread to be scheduled
+ * according thread accounting and scheduler
+ * policy.
+ *
+ * @return Thread to be scheduled.
+ *
+ */
 struct thread *find_best_thread(void)
 {
@@ -156,9 +177,15 @@
 }
 
-/*
- * This function prevents low priority threads from starving in rq's.
- * When it decides to relink rq's, it reconnects respective pointers
- * so that in result threads with 'pri' greater or equal 'start' are
- * moved to a higher-priority queue.
+
+/** Prevent rq starvation
+ *
+ * Prevent low priority threads from starving in rq's.
+ *
+ * When the function decides to relink rq's, it reconnects
+ * respective pointers so that in result threads with 'pri'
+ * greater or equal 'start' are moved to a higher-priority queue.
+ *
+ * @param start Threshold priority.
+ *
  */
 void relink_rq(int start)
@@ -193,6 +220,9 @@
 }
 
-/*
- * The scheduler.
+
+/** The scheduler
+ *
+ * The thread scheduling procedure.
+ *
  */
 void scheduler(void)
@@ -238,4 +268,12 @@
 }
 
+
+/** Scheduler stack switch wrapper
+ *
+ * Second part of the scheduler() function
+ * using new stack. Handling the actual context
+ * switch to a new thread.
+ *
+ */
 void scheduler_separated_stack(void)
 {
@@ -366,8 +404,13 @@
 }
 
+
 #ifdef __SMP__
-/*
- * This is the load balancing thread. 
- * It supervises thread supplies for the CPU it's wired to.
+/** Load balancing thread
+ *
+ * SMP load balancing thread, supervising thread supplies
+ * for the CPU it's wired to.
+ *
+ * @param arg Generic thread argument (unused).
+ *
  */
 void kcpulb(void *arg)
Index: src/proc/task.c
===================================================================
--- src/proc/task.c	(revision ac5d02b7ec81adf50a7070d07dc35f5f6df54639)
+++ src/proc/task.c	(revision 70527f178e75c4d7b241a68de96deb60887233de)
@@ -40,4 +40,10 @@
 link_t tasks_head;
 
+
+/** Initialize tasks
+ *
+ * Initialize kernel tasks support.
+ *
+ */
 void task_init(void)
 {
@@ -47,4 +53,14 @@
 }
 
+
+/** Create new task
+ *
+ * Create new task with no threads.
+ *
+ * @param m Task's virtual memory structure.
+ *
+ * @return New task's structure on success, NULL on failure.
+ *
+ */
 task_t *task_create(vm_t *m)
 {
Index: src/proc/thread.c
===================================================================
--- src/proc/thread.c	(revision ac5d02b7ec81adf50a7070d07dc35f5f6df54639)
+++ src/proc/thread.c	(revision 70527f178e75c4d7b241a68de96deb60887233de)
@@ -51,5 +51,5 @@
 #include <arch/faddr.h>
 
-char *thread_states[] = {"Invalid", "Running", "Sleeping", "Ready", "Entering", "Exiting"};
+char *thread_states[] = {"Invalid", "Running", "Sleeping", "Ready", "Entering", "Exiting"}; /**< Thread states */
 
 spinlock_t threads_lock;
@@ -59,10 +59,13 @@
 __u32 last_tid = 0;
 
-/*
- * cushion() is provided to ensure that every thread
+
+/** Thread wrapper
+ *
+ * This wrapper is provided to ensure that every thread
  * makes a call to thread_exit() when its implementing
  * function returns.
  *
- * cpu_priority_high()'d
+ * cpu_priority_high() is assumed.
+ *
  */
 void cushion(void)
@@ -82,4 +85,10 @@
 }
 
+
+/** Initialize threads
+ *
+ * Initialize kernel threads support.
+ *
+ */
 void thread_init(void)
 {
@@ -90,4 +99,12 @@
 }
 
+
+/** Make thread ready
+ *
+ * Switch thread t to the ready state.
+ *
+ * @param t Thread to make ready.
+ *
+ */
 void thread_ready(thread_t *t)
 {
@@ -109,5 +126,5 @@
 	spinlock_unlock(&t->lock);
 	
-        /*
+	/*
 	 * Append t to respective ready queue on respective processor.
 	 */
@@ -134,4 +151,17 @@
 }
 
+
+/** Create new thread
+ *
+ * Create a new thread.
+ *
+ * @param func  Thread's implementing function.
+ * @param arg   Thread's implementing function argument.
+ * @param task  Task to which the thread belongs.
+ * @param flags Thread flags.
+ *
+ * @return New thread's structure on success, NULL on failure.
+ *
+ */
 thread_t *thread_create(void (* func)(void *), void *arg, task_t *task, int flags)
 {
@@ -214,4 +244,11 @@
 }
 
+
+/** Make thread exiting
+ *
+ * End current thread execution and switch it to the exiting
+ * state. All pending timeouts are executed.
+ *
+ */
 void thread_exit(void)
 {
@@ -231,12 +268,25 @@
 }
 
+
+/** Thread sleep
+ *
+ * Suspend execution of the current thread.
+ *
+ * @param sec Number of seconds to sleep.
+ *
+ */
 void thread_sleep(__u32 sec)
 {
         thread_usleep(sec*1000000);
 }
-	
-/*
- * Suspend execution of current thread for usec microseconds.
- */
+
+
+/** Thread usleep
+ *
+ * Suspend execution of the current thread.
+ *
+ * @param usec Number of microseconds to sleep.
+ *
+ */	
 void thread_usleep(__u32 usec)
 {
@@ -248,4 +298,14 @@
 }
 
+
+/** Register thread out-of-context invocation
+ *
+ * Register a function and its argument to be executed
+ * on next context switch to the current thread.
+ *
+ * @param call_me      Out-of-context function.
+ * @param call_me_with Out-of-context function argument.
+ *
+ */
 void thread_register_call_me(void (* call_me)(void *), void *call_me_with)
 {
Index: src/smp/ipi.c
===================================================================
--- src/smp/ipi.c	(revision ac5d02b7ec81adf50a7070d07dc35f5f6df54639)
+++ src/smp/ipi.c	(revision 70527f178e75c4d7b241a68de96deb60887233de)
@@ -32,4 +32,12 @@
 #include <config.h>
 
+
+/** Broadcast IPI message
+ *
+ * Broadcast IPI message to all CPUs.
+ *
+ * @param ipi Message to broadcast.
+ *
+ */
 void ipi_broadcast(int ipi)
 {
Index: src/time/clock.c
===================================================================
--- src/time/clock.c	(revision ac5d02b7ec81adf50a7070d07dc35f5f6df54639)
+++ src/time/clock.c	(revision 70527f178e75c4d7b241a68de96deb60887233de)
@@ -44,6 +44,10 @@
 #endif
 
-/*
- * Clock is called from an interrupt and is cpu_priority_high()'d.
+/** Clock routine
+ *
+ * Clock routine executed from clock interrupt handler
+ * (assuming cpu_priority_high()). Runs expired timeouts
+ * and preemptive scheduling.
+ *
  */
 void clock(void)
Index: src/time/delay.c
===================================================================
--- src/time/delay.c	(revision ac5d02b7ec81adf50a7070d07dc35f5f6df54639)
+++ src/time/delay.c	(revision 70527f178e75c4d7b241a68de96deb60887233de)
@@ -33,12 +33,20 @@
 #include <arch.h>
 
-/*
- * Note that the delay loop is calibrated for each and every CPU in the system.
- * Therefore it is necessary to cpu_priority_high() before calling the asm_delay_loop().
+/** Active delay
+ *
+ * Delay the execution for the given number
+ * of microseconds (or slightly more). The delay
+ * is implemented as CPU calibrated active loop.
+ *
+ * @param microseconds Number of usec to sleep.
+ *
  */
 void delay(__u32 microseconds)
 {
 	pri_t pri;
-
+	
+	/* The delay loop is calibrated for each and every
+	   CPU in the system. Therefore it is necessary to
+	   cpu_priority_high() before calling the asm_delay_loop(). */
 	pri = cpu_priority_high();
 	asm_delay_loop(microseconds * CPU->delay_loop_const);
Index: src/time/timeout.c
===================================================================
--- src/time/timeout.c	(revision ac5d02b7ec81adf50a7070d07dc35f5f6df54639)
+++ src/time/timeout.c	(revision 70527f178e75c4d7b241a68de96deb60887233de)
@@ -39,4 +39,10 @@
 #include <arch.h>
 
+
+/** Initialize timeouts
+ *
+ * Initialize kernel timeouts.
+ *
+ */
 void timeout_init(void)
 {
@@ -46,4 +52,11 @@
 
 
+/** Initialize empty timeout list
+ *
+ * Initialize the timeout list to be empty.
+ *
+ * @param t Timeout list to be initialized.
+ *
+ */
 void timeout_reinitialize(timeout_t *t)
 {
@@ -55,4 +68,12 @@
 }
 
+
+/** Initialize timeout list
+ *
+ * Initialize the timeout list and its spinlock.
+ *
+ * @param t Timeout list to be initialized.
+ *
+ */
 void timeout_initialize(timeout_t *t)
 {
@@ -61,6 +82,17 @@
 }
 
-/*
- * This function registers f for execution in about time microseconds.
+
+/** Register timeout callback
+ *
+ * Insert the timeout handler f (with argument arg)
+ * to the timeout list and make it execute in
+ * time microseconds (or slightly more).
+ *
+ * @param t    Timeout list.
+ * @patam time Number of usec in the future to execute
+ *             the handler.
+ * @param f    Timeout handler function.
+ * @param arg  Timeout handler argument.
+ *
  */
 void timeout_register(timeout_t *t, __u64 time, timeout_handler f, void *arg)
@@ -122,4 +154,12 @@
 }
 
+
+/** Unregister timeout callback
+ *
+ * Remove timeout from timeout list.
+ *
+ * @param t Timeout to unregister.
+ *
+ */
 int timeout_unregister(timeout_t *t)
 {
