Index: kernel/generic/src/proc/task.c
===================================================================
--- kernel/generic/src/proc/task.c	(revision b658c5dcfbdf75d4121c595dd0f965265d2b16cd)
+++ kernel/generic/src/proc/task.c	(revision 5ba201d1b59ac56658a3f14dd383a51abae28b5e)
@@ -33,5 +33,5 @@
 /**
  * @file
- * @brief	Task management.
+ * @brief Task management.
  */
 
@@ -66,4 +66,5 @@
  * The task is guaranteed to exist after it was found in the tasks_tree as
  * long as:
+ *
  * @li the tasks_lock is held,
  * @li the task's lock is held when task's lock is acquired before releasing
@@ -99,5 +100,5 @@
 	task_t *t = avltree_get_instance(node, task_t, tasks_tree_node);
 	unsigned *cnt = (unsigned *) arg;
-
+	
 	if (t != TASK) {
 		(*cnt)++;
@@ -107,6 +108,7 @@
 		task_kill_internal(t);
 	}
-
-	return true;	/* continue the walk */
+	
+	/* Continue the walk */
+	return true;
 }
 
@@ -115,5 +117,5 @@
 {
 	unsigned tasks_left;
-
+	
 	do { /* Repeat until there are any tasks except TASK */
 		/* Messing with task structures, avoid deadlock */
@@ -138,19 +140,19 @@
 	task_t *ta = obj;
 	int i;
-
+	
 	atomic_set(&ta->refcount, 0);
 	atomic_set(&ta->lifecount, 0);
 	atomic_set(&ta->active_calls, 0);
-
+	
 	spinlock_initialize(&ta->lock, "task_ta_lock");
 	mutex_initialize(&ta->futexes_lock, MUTEX_PASSIVE);
-
+	
 	list_initialize(&ta->th_head);
 	list_initialize(&ta->sync_box_head);
-
+	
 	ipc_answerbox_init(&ta->answerbox, ta);
 	for (i = 0; i < IPC_MAX_PHONES; i++)
 		ipc_phone_init(&ta->phones[i]);
-
+	
 #ifdef CONFIG_UDEBUG
 	/* Init kbox stuff */
@@ -159,5 +161,5 @@
 	mutex_initialize(&ta->kb.cleanup_lock, MUTEX_PASSIVE);
 #endif
-
+	
 	return 0;
 }
@@ -165,8 +167,8 @@
 /** Create new task with no threads.
  *
- * @param as		Task's address space.
- * @param name		Symbolic name (a copy is made).
- *
- * @return		New task's structure.
+ * @param as   Task's address space.
+ * @param name Symbolic name (a copy is made).
+ *
+ * @return New task's structure.
  *
  */
@@ -181,21 +183,21 @@
 	memcpy(ta->name, name, TASK_NAME_BUFLEN);
 	ta->name[TASK_NAME_BUFLEN - 1] = 0;
-
+	
 	ta->context = CONTEXT;
 	ta->capabilities = 0;
 	ta->cycles = 0;
-
+	
 #ifdef CONFIG_UDEBUG
 	/* Init debugging stuff */
 	udebug_task_init(&ta->udebug);
-
+	
 	/* Init kbox stuff */
 	ta->kb.finished = false;
 #endif
-
+	
 	if ((ipc_phone_0) &&
 	    (context_check(ipc_phone_0->task->context, ta->context)))
 		ipc_phone_connect(&ta->phones[0], ipc_phone_0);
-
+	
 	btree_create(&ta->futexes);
 	
@@ -215,5 +217,6 @@
 /** Destroy task.
  *
- * @param t		Task to be destroyed.
+ * @param t Task to be destroyed.
+ *
  */
 void task_destroy(task_t *t)
@@ -225,15 +228,15 @@
 	avltree_delete(&tasks_tree, &t->tasks_tree_node);
 	spinlock_unlock(&tasks_lock);
-
+	
 	/*
 	 * Perform architecture specific task destruction.
 	 */
 	task_destroy_arch(t);
-
+	
 	/*
 	 * Free up dynamically allocated state.
 	 */
 	btree_destroy(&t->futexes);
-
+	
 	/*
 	 * Drop our reference to the address space.
@@ -248,8 +251,9 @@
 /** Syscall for reading task ID from userspace.
  *
- * @param		uspace_task_id userspace address of 8-byte buffer
- * 			where to store current task ID.
- *
- * @return		Zero on success or an error code from @ref errno.h.
+ * @param uspace_task_id Userspace address of 8-byte buffer
+ *                       where to store current task ID.
+ *
+ * @return Zero on success or an error code from @ref errno.h.
+ *
  */
 unative_t sys_task_get_id(task_id_t *uspace_task_id)
@@ -267,8 +271,9 @@
  * The name simplifies identifying the task in the task list.
  *
- * @param name	The new name for the task. (typically the same
- *		as the command used to execute it).
+ * @param name The new name for the task. (typically the same
+ *             as the command used to execute it).
  *
  * @return 0 on success or an error code from @ref errno.h.
+ *
  */
 unative_t sys_task_set_name(const char *uspace_name, size_t name_len)
@@ -276,17 +281,17 @@
 	int rc;
 	char namebuf[TASK_NAME_BUFLEN];
-
+	
 	/* Cap length of name and copy it from userspace. */
-
+	
 	if (name_len > TASK_NAME_BUFLEN - 1)
 		name_len = TASK_NAME_BUFLEN - 1;
-
+	
 	rc = copy_from_uspace(namebuf, uspace_name, name_len);
 	if (rc != 0)
 		return (unative_t) rc;
-
+	
 	namebuf[name_len] = '\0';
 	str_cpy(TASK->name, TASK_NAME_BUFLEN, namebuf);
-
+	
 	return EOK;
 }
@@ -297,15 +302,18 @@
  * interrupts must be disabled.
  *
- * @param id		Task ID.
- *
- * @return		Task structure address or NULL if there is no such task
- * 			ID.
- */
-task_t *task_find_by_id(task_id_t id) { avltree_node_t *node;
-	
+ * @param id Task ID.
+ *
+ * @return Task structure address or NULL if there is no such task
+ *         ID.
+ *
+ */
+task_t *task_find_by_id(task_id_t id)
+{
+	avltree_node_t *node;
 	node = avltree_search(&tasks_tree, (avltree_key_t) id);
-
+	
 	if (node)
 		return avltree_get_instance(node, task_t, tasks_tree_node); 
+	
 	return NULL;
 }
@@ -316,8 +324,9 @@
  * already disabled.
  *
- * @param t		Pointer to thread.
- *
- * @return		Number of cycles used by the task and all its threads
- * 			so far.
+ * @param t Pointer to task.
+ *
+ * @return Number of cycles used by the task and all its threads
+ *         so far.
+ *
  */
 uint64_t task_get_accounting(task_t *t)
@@ -349,5 +358,5 @@
 {
 	link_t *cur;
-
+	
 	/*
 	 * Interrupt all threads.
@@ -377,7 +386,8 @@
  * It signals all the task's threads to bail it out.
  *
- * @param id		ID of the task to be killed.
- *
- * @return		Zero on success or an error code from errno.h.
+ * @param id ID of the task to be killed.
+ *
+ * @return Zero on success or an error code from errno.h.
+ *
  */
 int task_kill(task_id_t id)
@@ -406,17 +416,17 @@
 	task_t *t = avltree_get_instance(node, task_t, tasks_tree_node);
 	int j;
-		
+	
 	spinlock_lock(&t->lock);
-			
+	
 	uint64_t cycles;
 	char suffix;
 	order(task_get_accounting(t), &cycles, &suffix);
-
-#ifdef __32_BITS__	
+	
+#ifdef __32_BITS__
 	printf("%-6" PRIu64 " %-12s %-3" PRIu32 " %10p %10p %9" PRIu64
 	    "%c %7ld %6ld", t->taskid, t->name, t->context, t, t->as, cycles,
 	    suffix, atomic_get(&t->refcount), atomic_get(&t->active_calls));
 #endif
-
+	
 #ifdef __64_BITS__
 	printf("%-6" PRIu64 " %-12s %-3" PRIu32 " %18p %18p %9" PRIu64
@@ -424,5 +434,5 @@
 	    suffix, atomic_get(&t->refcount), atomic_get(&t->active_calls));
 #endif
-
+	
 	for (j = 0; j < IPC_MAX_PHONES; j++) {
 		if (t->phones[j].callee)
@@ -430,5 +440,5 @@
 	}
 	printf("\n");
-			
+	
 	spinlock_unlock(&t->lock);
 	return true;
@@ -443,6 +453,6 @@
 	ipl = interrupts_disable();
 	spinlock_lock(&tasks_lock);
-
-#ifdef __32_BITS__	
+	
+#ifdef __32_BITS__
 	printf("taskid name         ctx address    as         "
 	    "cycles     threads calls  callee\n");
@@ -450,5 +460,5 @@
 	    "---------- ------- ------ ------>\n");
 #endif
-
+	
 #ifdef __64_BITS__
 	printf("taskid name         ctx address            as                 "
@@ -457,7 +467,7 @@
 	    "---------- ------- ------ ------>\n");
 #endif
-
+	
 	avltree_walk(&tasks_tree, task_print_walker, NULL);
-
+	
 	spinlock_unlock(&tasks_lock);
 	interrupts_restore(ipl);
