Index: kernel/generic/src/proc/task.c
===================================================================
--- kernel/generic/src/proc/task.c	(revision b2e121ad525328882607c97cdba1a9ded6137d13)
+++ kernel/generic/src/proc/task.c	(revision d5e5fd1214ee9617b9a936d6f09efec4c9a91b48)
@@ -107,15 +107,15 @@
 	task_t *task = avltree_get_instance(node, task_t, tasks_tree_node);
 	size_t *cnt = (size_t *) arg;
-	
+
 	if (task != TASK) {
 		(*cnt)++;
-		
+
 #ifdef CONFIG_DEBUG
 		printf("[%"PRIu64"] ", task->taskid);
 #endif
-		
+
 		task_kill_internal(task);
 	}
-	
+
 	/* Continue the walk */
 	return true;
@@ -138,5 +138,5 @@
 		task_release(task_0);
 	}
-	
+
 	/* Repeat until there are any tasks except TASK */
 	do {
@@ -144,12 +144,12 @@
 		printf("Killing tasks... ");
 #endif
-		
+
 		irq_spinlock_lock(&tasks_lock, true);
 		tasks_left = 0;
 		avltree_walk(&tasks_tree, task_done_walker, &tasks_left);
 		irq_spinlock_unlock(&tasks_lock, true);
-		
+
 		thread_sleep(1);
-		
+
 #ifdef CONFIG_DEBUG
 		printf("\n");
@@ -165,17 +165,17 @@
 	if (rc != EOK)
 		return rc;
-	
+
 	atomic_set(&task->refcount, 0);
 	atomic_set(&task->lifecount, 0);
-	
+
 	irq_spinlock_initialize(&task->lock, "task_t_lock");
-	
+
 	list_initialize(&task->threads);
-	
+
 	ipc_answerbox_init(&task->answerbox, task);
-	
+
 	spinlock_initialize(&task->active_calls_lock, "active_calls_lock");
 	list_initialize(&task->active_calls);
-		
+
 #ifdef CONFIG_UDEBUG
 	/* Init kbox stuff */
@@ -184,5 +184,5 @@
 	mutex_initialize(&task->kb.cleanup_lock, MUTEX_PASSIVE);
 #endif
-	
+
 	return EOK;
 }
@@ -191,5 +191,5 @@
 {
 	task_t *task = (task_t *) obj;
-	
+
 	caps_task_free(task);
 	return 0;
@@ -210,10 +210,10 @@
 		return NULL;
 	}
-	
+
 	task_create_arch(task);
-	
+
 	task->as = as;
 	str_cpy(task->name, TASK_NAME_BUFLEN, name);
-	
+
 	task->container = CONTAINER;
 	task->perms = 0;
@@ -231,5 +231,5 @@
 
 	event_task_init(task);
-	
+
 	task->answerbox.active = true;
 
@@ -237,10 +237,10 @@
 	/* Init debugging stuff */
 	udebug_task_init(&task->udebug);
-	
+
 	/* Init kbox stuff */
 	task->kb.box.active = true;
 	task->kb.finished = false;
 #endif
-	
+
 	if ((ipc_phone_0) &&
 	    (container_check(ipc_phone_0->task->container, task->container))) {
@@ -253,26 +253,26 @@
 			return NULL;
 		}
-		
+
 		kobject_t *phone_obj = kobject_get(task, phone_handle,
 		    KOBJECT_TYPE_PHONE);
 		(void) ipc_phone_connect(phone_obj->phone, ipc_phone_0);
 	}
-	
+
 	futex_task_init(task);
-	
+
 	/*
 	 * Get a reference to the address space.
 	 */
 	as_hold(task->as);
-	
+
 	irq_spinlock_lock(&tasks_lock, true);
-	
+
 	task->taskid = ++task_counter;
 	avltree_node_initialize(&task->tasks_tree_node);
 	task->tasks_tree_node.key = task->taskid;
 	avltree_insert(&tasks_tree, &task->tasks_tree_node);
-	
+
 	irq_spinlock_unlock(&tasks_lock, true);
-	
+
 	return task;
 }
@@ -291,20 +291,20 @@
 	avltree_delete(&tasks_tree, &task->tasks_tree_node);
 	irq_spinlock_unlock(&tasks_lock, true);
-	
+
 	/*
 	 * Perform architecture specific task destruction.
 	 */
 	task_destroy_arch(task);
-	
+
 	/*
 	 * Free up dynamically allocated state.
 	 */
 	futex_task_deinit(task);
-	
+
 	/*
 	 * Drop our reference to the address space.
 	 */
 	as_release(task->as);
-	
+
 	slab_free(task_cache, task);
 }
@@ -388,15 +388,15 @@
 {
 	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;
-	
+
 	errno_t rc = copy_from_uspace(namebuf, uspace_name, name_len);
 	if (rc != EOK)
 		return (sys_errno_t) rc;
-	
+
 	namebuf[name_len] = '\0';
-	
+
 	/*
 	 * As the task name is referenced also from the
@@ -404,16 +404,16 @@
 	 * of the update.
 	 */
-	
+
 	irq_spinlock_lock(&tasks_lock, true);
 	irq_spinlock_lock(&TASK->lock, false);
 	irq_spinlock_lock(&threads_lock, false);
-	
+
 	/* Set task name */
 	str_cpy(TASK->name, TASK_NAME_BUFLEN, namebuf);
-	
+
 	irq_spinlock_unlock(&threads_lock, false);
 	irq_spinlock_unlock(&TASK->lock, false);
 	irq_spinlock_unlock(&tasks_lock, true);
-	
+
 	return EOK;
 }
@@ -432,5 +432,5 @@
 	if (rc != EOK)
 		return (sys_errno_t) rc;
-	
+
 	return (sys_errno_t) task_kill(taskid);
 }
@@ -453,8 +453,8 @@
 	avltree_node_t *node =
 	    avltree_search(&tasks_tree, (avltree_key_t) id);
-	
+
 	if (node)
 		return avltree_get_instance(node, task_t, tasks_tree_node);
-	
+
 	return NULL;
 }
@@ -478,9 +478,9 @@
 	uint64_t uret = task->ucycles;
 	uint64_t kret = task->kcycles;
-	
+
 	/* Current values of threads */
 	list_foreach(task->threads, th_link, thread_t, thread) {
 		irq_spinlock_lock(&thread->lock, false);
-		
+
 		/* Process only counted threads */
 		if (!thread->uncounted) {
@@ -489,12 +489,12 @@
 				thread_update_accounting(false);
 			}
-			
+
 			uret += thread->ucycles;
 			kret += thread->kcycles;
 		}
-		
+
 		irq_spinlock_unlock(&thread->lock, false);
 	}
-	
+
 	*ucycles = uret;
 	*kcycles = kret;
@@ -505,24 +505,24 @@
 	irq_spinlock_lock(&task->lock, false);
 	irq_spinlock_lock(&threads_lock, false);
-	
+
 	/*
 	 * Interrupt all threads.
 	 */
-	
+
 	list_foreach(task->threads, th_link, thread_t, thread) {
 		bool sleeping = false;
-		
+
 		irq_spinlock_lock(&thread->lock, false);
-		
+
 		thread->interrupted = true;
 		if (thread->state == Sleeping)
 			sleeping = true;
-		
+
 		irq_spinlock_unlock(&thread->lock, false);
-		
+
 		if (sleeping)
 			waitq_interrupt_sleep(thread);
 	}
-	
+
 	irq_spinlock_unlock(&threads_lock, false);
 	irq_spinlock_unlock(&task->lock, false);
@@ -543,7 +543,7 @@
 	if (id == 1)
 		return EPERM;
-	
+
 	irq_spinlock_lock(&tasks_lock, true);
-	
+
 	task_t *task = task_find_by_id(id);
 	if (!task) {
@@ -551,8 +551,8 @@
 		return ENOENT;
 	}
-	
+
 	task_kill_internal(task);
 	irq_spinlock_unlock(&tasks_lock, true);
-	
+
 	return EOK;
 }
@@ -583,9 +583,9 @@
 		}
 	}
-	
+
 	irq_spinlock_lock(&tasks_lock, true);
 	task_kill_internal(TASK);
 	irq_spinlock_unlock(&tasks_lock, true);
-	
+
 	thread_exit();
 }
@@ -599,5 +599,5 @@
 {
 	task_kill_self(notify);
-	
+
 	/* Unreachable */
 	return EOK;
@@ -609,5 +609,5 @@
 	task_t *task = avltree_get_instance(node, task_t, tasks_tree_node);
 	irq_spinlock_lock(&task->lock, false);
-	
+
 	uint64_t ucycles;
 	uint64_t kcycles;
@@ -616,5 +616,5 @@
 	order_suffix(ucycles, &ucycles, &usuffix);
 	order_suffix(kcycles, &kcycles, &ksuffix);
-	
+
 #ifdef __32_BITS__
 	if (*additional)
@@ -627,5 +627,5 @@
 		    ucycles, usuffix, kcycles, ksuffix);
 #endif
-	
+
 #ifdef __64_BITS__
 	if (*additional)
@@ -637,5 +637,5 @@
 		    task->taskid, task->name, task->container, task, task->as);
 #endif
-	
+
 	irq_spinlock_unlock(&task->lock, false);
 	return true;
@@ -651,5 +651,5 @@
 	/* Messing with task structures, avoid deadlock */
 	irq_spinlock_lock(&tasks_lock, true);
-	
+
 #ifdef __32_BITS__
 	if (additional)
@@ -659,5 +659,5 @@
 		    " [ucycles ] [kcycles ]\n");
 #endif
-	
+
 #ifdef __64_BITS__
 	if (additional)
@@ -668,7 +668,7 @@
 		    " [as              ]\n");
 #endif
-	
+
 	avltree_walk(&tasks_tree, task_print_walker, &additional);
-	
+
 	irq_spinlock_unlock(&tasks_lock, true);
 }
