Index: c/TODO
===================================================================
--- doc/TODO	(revision 24f3874a4a82af6978a92f03e6b9dee9674ab008)
+++ 	(revision )
@@ -1,26 +1,0 @@
-+ implement true memory barriers for all architectures
-
-+ implement true memory management
-  + [ia32] use int 0x15 ax=0xe820 to get memory map and memory size	[DONE]
-  + [mips] use some heuristics to get memory map and memory size
-  + reimplement heap so that it can allocate/deallocate
-    itself frames as necessary						[DONE]
-  + provide native four-level portable page table interface		[DONE]
-    + every architecture uses its native page table format
-    + kernel provides unified four-level page table interface
-      or page hash table interface to architectures
-  + deallocation of memory of empty page tables				[DONE]
-
-+ get user mode support for all architectures
-
-+ save/restore floating point context on context switch 
-  + [ia32] lazy context switch using TS flag                            [DONE]
-+ [ia32] MMX,SSE1-.. initialization
-+ [ia32] review privilege separation                                    [DONE]
-  + zero IOPL in EFLAGS                                                 [DONE]
-  + before IRET (from SYSCALL), zero NT in EFLAGS                       [DONE]
-+ [ia32] review the cache controling bits in CR0 register
-+ [ia32] zero the alignment exception bit in EFLAGS                     [DONE]
-  - Task changed to clear AM in CR0 so that
-    the alignment check is disabled globally
-+ make emulated architectures also work on real hardware
Index: genarch/src/mm/page_ht.c
===================================================================
--- genarch/src/mm/page_ht.c	(revision 24f3874a4a82af6978a92f03e6b9dee9674ab008)
+++ genarch/src/mm/page_ht.c	(revision 7f0837cc107de409715135bd7cdfd7724b6e37a9)
@@ -155,10 +155,10 @@
 /** Map page to frame using page hash table.
  *
- * Map virtual address 'page' to physical address 'frame'
- * using 'flags'. 
+ * Map virtual address @page to physical address @frame
+ * using @flags. 
  *
  * The page table must be locked and interrupts must be disabled.
  *
- * @param as Address space to which page belongs.
+ * @param as Address space to which @page belongs.
  * @param page Virtual address of the page to be mapped.
  * @param frame Physical address of memory frame to which the mapping is done.
@@ -191,5 +191,5 @@
 /** Remove mapping of page from page hash table.
  *
- * Remove any mapping of 'page' within address space 'as'.
+ * Remove any mapping of @page within address space @as.
  * TLB shootdown should follow in order to make effects of
  * this call visible.
@@ -218,5 +218,5 @@
  * The page table must be locked and interrupts must be disabled.
  *
- * @param as Address space to wich page belongs.
+ * @param as Address space to wich @page belongs.
  * @param page Virtual page.
  *
Index: genarch/src/mm/page_pt.c
===================================================================
--- genarch/src/mm/page_pt.c	(revision 24f3874a4a82af6978a92f03e6b9dee9674ab008)
+++ genarch/src/mm/page_pt.c	(revision 7f0837cc107de409715135bd7cdfd7724b6e37a9)
@@ -50,6 +50,6 @@
 /** Map page to frame using hierarchical page tables.
  *
- * Map virtual address 'page' to physical address 'frame'
- * using 'flags'.
+ * Map virtual address @page to physical address @frame
+ * using @flags.
  *
  * The page table must be locked and interrupts must be disabled.
@@ -108,5 +108,5 @@
  * The page table must be locked and interrupts must be disabled.
  *
- * @param as Address space to wich page belongs.
+ * @param as Address space to wich @page belongs.
  * @param page Virtual address of the page to be demapped.
  */
@@ -228,5 +228,5 @@
  * The page table must be locked and interrupts must be disabled.
  *
- * @param as Address space to which page belongs.
+ * @param as Address space to which @page belongs.
  * @param page Virtual page.
  *
Index: generic/include/mm/buddy.h
===================================================================
--- generic/include/mm/buddy.h	(revision 24f3874a4a82af6978a92f03e6b9dee9674ab008)
+++ generic/include/mm/buddy.h	(revision 7f0837cc107de409715135bd7cdfd7724b6e37a9)
@@ -42,6 +42,6 @@
 	void (*set_order)(buddy_system_t *, link_t *, __u8);		/**< Set order of block passed as argument. */
 	__u8 (*get_order)(buddy_system_t *, link_t *);			/**< Return order of block passed as argument. */
-	void (*mark_busy)(buddy_system_t *, link_t *);			/**< Mark block as busy */
-	void (*mark_available)(buddy_system_t *, link_t *);		/**< Mark block as busy */
+	void (*mark_busy)(buddy_system_t *, link_t *);			/**< Mark block as busy. */
+	void (*mark_available)(buddy_system_t *, link_t *);		/**< Mark block as available. */
 	/** Find parent of block that has given order  */
 	link_t *(* find_block)(buddy_system_t *, link_t *, __u8);
Index: generic/src/debug/print.c
===================================================================
--- generic/src/debug/print.c	(revision 24f3874a4a82af6978a92f03e6b9dee9674ab008)
+++ generic/src/debug/print.c	(revision 7f0837cc107de409715135bd7cdfd7724b6e37a9)
@@ -81,7 +81,7 @@
 }
 
-/** Print one string without appending '\n' to the end
- *
- * Dont use this function directly - printflock is not locked here
+/** Print one string without appending '\n' to the end.
+ *
+ * Do not use this function directly - printflock is not locked here.
  *
  */
@@ -99,6 +99,10 @@
 }
 
-/** Print count characters from buffer to output
- *
+/** Print count characters from buffer to output.
+ *
+ * @param buffer Address of the buffer with charaters to be printed.
+ * @param count Number of characters to be printed.
+ *
+ * @return Number of characters printed.
  */
 static int putnchars(const char *buffer, __native count)
@@ -119,8 +123,8 @@
 /** Print one formatted character
  *
- * @param c character to print
+ * @param c Character to print.
  * @param width 
  * @param flags
- * @return number of printed characters or EOF
+ * @return Number of printed characters or EOF.
  */
 static int print_char(char c, int width, __u64 flags)
@@ -350,7 +354,7 @@
 }
 
-/** General formatted text print
- *
- * Print string formatted according to the fmt parameter
+/** Print formatted string.
+ *
+ * Print string formatted according to the @fmt parameter
  * and variadic arguments. Each formatting directive
  * must have the following form:
@@ -362,6 +366,6 @@
  * -	Align to left.
  * +	Print positive sign just as negative.
- *   (space)	If printed number is positive and '+' flag is not set, print space in place of sign.
- * 0	Print 0 as padding instead of spaces. Zeroes are placed between sign and the rest of number.
+ *   (space)	If the printed number is positive and '+' flag is not set, print space in place of sign.
+ * 0	Print 0 as padding instead of spaces. Zeroes are placed between sign and the rest of the number.
  *	This flag is ignored if '-' flag is specified.
  * 
@@ -369,5 +373,5 @@
  * Specify minimal width of printed argument. If it is bigger, width is ignored.
  * If width is specified with a '*' character instead of number, width is taken from parameter list. 
- * Int parameter expected before parameter for processed conversion specification.
+ * And integer parameter is expected before parameter for processed conversion specification.
  * If this value is negative its absolute value is taken and the '-' flag is set.
  *
@@ -391,5 +395,5 @@
  * CONVERSIONS:
  * 
- * %	Print percentage character.
+ * %	Print percentage character itself.
  *
  * c	Print single character.
@@ -398,5 +402,5 @@
  * 
  * P, p	Print value of a pointer. Void * value is expected and it is printed in hexadecimal notation with prefix
- * ( as with %#X or %#x for 32bit or %#X / %#x for 64bit long pointers).
+ * (as with %#X or %#x for 32bit or %#X / %#x for 64bit long pointers).
  *
  * b	Print value as unsigned binary number. Prefix is not printed by default. (Nonstandard extension.)
@@ -408,11 +412,11 @@
  * u	Print unsigned decimal number.
  *
- * X, x	Print hexadecimal number with upper- or lower-case. Prefix is not printed by default. 
- * 
- * All other characters from fmt except the formatting directives
+ * X, x	Print hexadecimal number with upper- or lower-case. Prefix is not printed by default.
+ * 
+ * All other characters from @fmt except the formatting directives
  * are printed in verbatim.
  *
  * @param fmt Formatting NULL terminated string.
- * @return count of printed characters or negative value on fail.
+ * @return Number of printed characters or negative value on failure.
  */
 int printf(const char *fmt, ...)
Index: generic/src/main/main.c
===================================================================
--- generic/src/main/main.c	(revision 24f3874a4a82af6978a92f03e6b9dee9674ab008)
+++ generic/src/main/main.c	(revision 7f0837cc107de409715135bd7cdfd7724b6e37a9)
@@ -96,5 +96,5 @@
 #define CONFIG_STACK_SIZE	((1<<STACK_FRAMES)*STACK_SIZE)
 
-/** Bootstrap CPU main kernel routine
+/** Main kernel routine for bootstrap CPU.
  *
  * Initializes the kernel by bootstrap CPU.
@@ -138,5 +138,5 @@
 
 
-/** Bootstrap CPU main kernel routine stack wrapper
+/** Main kernel routine for bootstrap CPU using new stack.
  *
  * Second part of main_bsp().
@@ -225,5 +225,5 @@
 
 #ifdef CONFIG_SMP
-/** Application CPUs main kernel routine
+/** Main kernel routine for application CPUs.
  *
  * Executed by application processors, temporary stack
@@ -276,5 +276,5 @@
 
 
-/** Application CPUs main kernel routine stack wrapper
+/** Main kernel routine for application CPUs using new stack.
  *
  * Second part of main_ap().
Index: generic/src/mm/buddy.c
===================================================================
--- generic/src/mm/buddy.c	(revision 24f3874a4a82af6978a92f03e6b9dee9674ab008)
+++ generic/src/mm/buddy.c	(revision 7f0837cc107de409715135bd7cdfd7724b6e37a9)
@@ -46,5 +46,5 @@
  * Allocate memory for and initialize new buddy system.
  *
- * @param b Preallocated buddy system control data
+ * @param b Preallocated buddy system control data.
  * @param max_order The biggest allocable size will be 2^max_order.
  * @param op Operations for new buddy system.
Index: generic/src/mm/page.c
===================================================================
--- generic/src/mm/page.c	(revision 24f3874a4a82af6978a92f03e6b9dee9674ab008)
+++ generic/src/mm/page.c	(revision 7f0837cc107de409715135bd7cdfd7724b6e37a9)
@@ -74,6 +74,6 @@
 /** Insert mapping of page to frame.
  *
- * Map virtual address 'page' to physical address 'frame'
- * using 'flags'. Allocate and setup any missing page tables.
+ * Map virtual address @page to physical address @frame
+ * using @flags. Allocate and setup any missing page tables.
  *
  * The page table must be locked and interrupts must be disabled.
@@ -94,5 +94,5 @@
 /** Remove mapping of page.
  *
- * Remove any mapping of 'page' within address space 'as'.
+ * Remove any mapping of @page within address space @as.
  * TLB shootdown should follow in order to make effects of
  * this call visible.
Index: generic/src/proc/scheduler.c
===================================================================
--- generic/src/proc/scheduler.c	(revision 24f3874a4a82af6978a92f03e6b9dee9674ab008)
+++ generic/src/proc/scheduler.c	(revision 7f0837cc107de409715135bd7cdfd7724b6e37a9)
@@ -240,5 +240,5 @@
  * 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.
+ * greater or equal @start are moved to a higher-priority queue.
  *
  * @param start Threshold priority.
Index: generic/src/proc/task.c
===================================================================
--- generic/src/proc/task.c	(revision 24f3874a4a82af6978a92f03e6b9dee9674ab008)
+++ generic/src/proc/task.c	(revision 7f0837cc107de409715135bd7cdfd7724b6e37a9)
@@ -116,5 +116,5 @@
  * @param name Program name. 
  *
- * @return Task of the running program or NULL on error
+ * @return Task of the running program or NULL on error.
  */
 task_t * task_run_program(void *program_addr, char *name)
@@ -226,4 +226,3 @@
 	spinlock_unlock(&tasks_lock);
 	interrupts_restore(ipl);
-	
-}
+}
Index: generic/src/synch/condvar.c
===================================================================
--- generic/src/synch/condvar.c	(revision 24f3874a4a82af6978a92f03e6b9dee9674ab008)
+++ generic/src/synch/condvar.c	(revision 7f0837cc107de409715135bd7cdfd7724b6e37a9)
@@ -77,5 +77,5 @@
  *
  * For exact description of possible combinations of
- * 'usec' and 'trywait', see comment for waitq_sleep_timeout().
+ * @usec and @trywait, see comment for waitq_sleep_timeout().
  *
  * @return See comment for waitq_sleep_timeout().
Index: generic/src/synch/futex.c
===================================================================
--- generic/src/synch/futex.c	(revision 24f3874a4a82af6978a92f03e6b9dee9674ab008)
+++ generic/src/synch/futex.c	(revision 7f0837cc107de409715135bd7cdfd7724b6e37a9)
@@ -94,5 +94,5 @@
  * @param uaddr Userspace address of the futex counter.
  * @param usec If non-zero, number of microseconds this thread is willing to sleep.
- * @param trydown If usec is zero and trydown is non-zero, conditional operation will be attempted.
+ * @param trydown If @usec is zero and trydown is non-zero, conditional operation will be attempted.
  *
  * @return One of ESYNCH_TIMEOUT, ESYNCH_OK_ATOMIC and ESYNCH_OK_BLOCKED. See synch.h.
@@ -219,18 +219,18 @@
 /** Compute hash index into futex hash table.
  *
+ * @param key Address where the @key (i.e. physical address of futex counter) is stored.
+ *
+ * @return Index into futex hash table.
+ */
+index_t futex_ht_hash(__native *key)
+{
+	return *key & (FUTEX_HT_SIZE-1);
+}
+
+/** Compare futex hash table item with a key.
+ *
  * @param key Address where the key (i.e. physical address of futex counter) is stored.
  *
- * @return Index into futex hash table.
- */
-index_t futex_ht_hash(__native *key)
-{
-	return *key & (FUTEX_HT_SIZE-1);
-}
-
-/** Compare futex hash table item with a key.
- *
- * @param key Address where the key (i.e. physical address of futex counter) is stored.
- *
- * @return True if the item matches the key. False otherwise.
+ * @return True if the item matches the @key. False otherwise.
  */
 bool futex_ht_compare(__native *key, count_t keys, link_t *item)
Index: generic/src/synch/mutex.c
===================================================================
--- generic/src/synch/mutex.c	(revision 24f3874a4a82af6978a92f03e6b9dee9674ab008)
+++ generic/src/synch/mutex.c	(revision 7f0837cc107de409715135bd7cdfd7724b6e37a9)
@@ -52,5 +52,5 @@
  *
  * For exact description of possible combinations of
- * 'usec' and 'trylock', see comment for waitq_sleep_timeout().
+ * @usec and @trylock, see comment for waitq_sleep_timeout().
  *
  * @return See comment for waitq_sleep_timeout().
Index: generic/src/synch/rwlock.c
===================================================================
--- generic/src/synch/rwlock.c	(revision 24f3874a4a82af6978a92f03e6b9dee9674ab008)
+++ generic/src/synch/rwlock.c	(revision 7f0837cc107de409715135bd7cdfd7724b6e37a9)
@@ -92,5 +92,5 @@
  *
  * For exact description of possible combinations of
- * 'usec' and 'trylock', see comment for waitq_sleep_timeout().
+ * @usec and @trylock, see comment for waitq_sleep_timeout().
  *
  * @return See comment for waitq_sleep_timeout().
@@ -146,5 +146,5 @@
  *
  * For exact description of possible combinations of
- * 'usec' and 'trylock', see comment for waitq_sleep_timeout().
+ * @usec and @trylock, see comment for waitq_sleep_timeout().
  *
  * @return See comment for waitq_sleep_timeout().
Index: generic/src/synch/semaphore.c
===================================================================
--- generic/src/synch/semaphore.c	(revision 24f3874a4a82af6978a92f03e6b9dee9674ab008)
+++ generic/src/synch/semaphore.c	(revision 7f0837cc107de409715135bd7cdfd7724b6e37a9)
@@ -66,5 +66,5 @@
  *
  * For exact description of possible combinations of
- * 'usec' and 'trydown', see comment for waitq_sleep_timeout().
+ * @usec and @trydown, see comment for waitq_sleep_timeout().
  *
  * @return See comment for waitq_sleep_timeout().
Index: generic/src/synch/waitq.c
===================================================================
--- generic/src/synch/waitq.c	(revision 24f3874a4a82af6978a92f03e6b9dee9674ab008)
+++ generic/src/synch/waitq.c	(revision 7f0837cc107de409715135bd7cdfd7724b6e37a9)
@@ -161,11 +161,11 @@
  * @param nonblocking Blocking vs. non-blocking operation mode switch.
  *
- * If usec is greater than zero, regardless of the value of nonblocking,
+ * If @usec is greater than zero, regardless of the value of @nonblocking,
  * the call will not return until either timeout or wakeup comes.
  *
- * If usec is zero and nonblocking is zero (false), the call
+ * If @usec is zero and @nonblocking is zero (false), the call
  * will not return until wakeup comes.
  *
- * If usec is zero and nonblocking is non-zero (true), the call will
+ * If @usec is zero and @nonblocking is non-zero (true), the call will
  * immediately return, reporting either success or failure.
  *
