Index: kernel/generic/src/proc/scheduler.c
===================================================================
--- kernel/generic/src/proc/scheduler.c	(revision df4ed852a2d1b242f9bdce0a873009a2cb77cec7)
+++ kernel/generic/src/proc/scheduler.c	(revision 1ba41c5ae41f66c7fa3ef1caef4b77d414202fb3)
@@ -361,5 +361,5 @@
 	context_save(&CPU->saved_context);
 	context_set(&CPU->saved_context, FADDR(scheduler_separated_stack),
-		(uintptr_t) CPU->stack, CPU_STACK_SIZE);
+	    (uintptr_t) CPU->stack, CPU_STACK_SIZE);
 	context_restore(&CPU->saved_context);
 	/* not reached */
@@ -501,6 +501,6 @@
 #ifdef SCHEDULER_VERBOSE
 	printf("cpu%d: tid %d (priority=%d, ticks=%lld, nrdy=%ld)\n",
-		CPU->id, THREAD->tid, THREAD->priority, THREAD->ticks,
-		atomic_get(&CPU->nrdy));
+	    CPU->id, THREAD->tid, THREAD->priority, THREAD->ticks,
+	    atomic_get(&CPU->nrdy));
 #endif	
 
@@ -636,7 +636,7 @@
 #ifdef KCPULB_VERBOSE
 				printf("kcpulb%d: TID %d -> cpu%d, nrdy=%ld, "
-					"avg=%nd\n", CPU->id, t->tid, CPU->id,
-					atomic_get(&CPU->nrdy),
-					atomic_get(&nrdy) / config.cpu_active);
+				    "avg=%nd\n", CPU->id, t->tid, CPU->id,
+				    atomic_get(&CPU->nrdy),
+				    atomic_get(&nrdy) / config.cpu_active);
 #endif
 				t->flags |= THREAD_FLAG_STOLEN;
@@ -704,6 +704,6 @@
 		spinlock_lock(&cpus[cpu].lock);
 		printf("cpu%d: address=%p, nrdy=%ld, needs_relink=%ld\n",
-			cpus[cpu].id, &cpus[cpu], atomic_get(&cpus[cpu].nrdy),
-			cpus[cpu].needs_relink);
+		    cpus[cpu].id, &cpus[cpu], atomic_get(&cpus[cpu].nrdy),
+		    cpus[cpu].needs_relink);
 		
 		for (i = 0; i < RQ_COUNT; i++) {
@@ -719,5 +719,5 @@
 				t = list_get_instance(cur, thread_t, rq_link);
 				printf("%d(%s) ", t->tid,
-					thread_states[t->state]);
+				    thread_states[t->state]);
 			}
 			printf("\n");
Index: kernel/generic/src/proc/task.c
===================================================================
--- kernel/generic/src/proc/task.c	(revision df4ed852a2d1b242f9bdce0a873009a2cb77cec7)
+++ kernel/generic/src/proc/task.c	(revision 1ba41c5ae41f66c7fa3ef1caef4b77d414202fb3)
@@ -66,7 +66,9 @@
 /** B+tree of active tasks.
  *
- * The task is guaranteed to exist after it was found in the tasks_btree as long as:
+ * The task is guaranteed to exist after it was found in the tasks_btree as
+ * long as:
  * @li the tasks_lock is held,
- * @li the task's lock is held when task's lock is acquired before releasing tasks_lock or
+ * @li the task's lock is held when task's lock is acquired before releasing
+ *     tasks_lock or
  * @li the task's refcount is greater than 0
  *
@@ -126,5 +128,6 @@
 	for (i = 0; i < IPC_MAX_PHONES; i++)
 		ipc_phone_init(&ta->phones[i]);
-	if ((ipc_phone_0) && (context_check(ipc_phone_0->task->context, ta->context)))
+	if ((ipc_phone_0) && (context_check(ipc_phone_0->task->context,
+	    ta->context)))
 		ipc_phone_connect(&ta->phones[0], ipc_phone_0);
 	atomic_set(&ta->active_calls, 0);
@@ -203,5 +206,6 @@
 	
 	kernel_uarg = (uspace_arg_t *) malloc(sizeof(uspace_arg_t), 0);
-	kernel_uarg->uspace_entry = (void *) ((elf_header_t *) program_addr)->e_entry;
+	kernel_uarg->uspace_entry =
+	    (void *) ((elf_header_t *) program_addr)->e_entry;
 	kernel_uarg->uspace_stack = (void *) USTACK_ADDRESS;
 	kernel_uarg->uspace_thread_function = NULL;
@@ -215,12 +219,13 @@
 	 * Create the data as_area.
 	 */
-	a = as_area_create(as, AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE, 
-		LOADED_PROG_STACK_PAGES_NO*PAGE_SIZE,
-		USTACK_ADDRESS, AS_AREA_ATTR_NONE, &anon_backend, NULL);
+	a = as_area_create(as, AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE,
+	    LOADED_PROG_STACK_PAGES_NO * PAGE_SIZE, USTACK_ADDRESS,
+	    AS_AREA_ATTR_NONE, &anon_backend, NULL);
 
 	/*
 	 * Create the main thread.
 	 */
-	t1 = thread_create(uinit, kernel_uarg, task, THREAD_FLAG_USPACE, "uinit", false);
+	t1 = thread_create(uinit, kernel_uarg, task, THREAD_FLAG_USPACE,
+	    "uinit", false);
 	ASSERT(t1);
 	
@@ -239,5 +244,6 @@
 /** Syscall for reading task ID from userspace.
  *
- * @param uspace_task_id Userspace address of 8-byte buffer where to store current task ID.
+ * @param uspace_task_id Userspace address of 8-byte buffer where to store
+ * current task ID.
  *
  * @return 0 on success or an error code from @ref errno.h.
@@ -249,5 +255,6 @@
 	 * remains constant for the lifespan of the task.
 	 */
-	return (unative_t) copy_to_uspace(uspace_task_id, &TASK->taskid, sizeof(TASK->taskid));
+	return (unative_t) copy_to_uspace(uspace_task_id, &TASK->taskid,
+	    sizeof(TASK->taskid));
 }
 
@@ -289,6 +296,8 @@
 		/* Process only counted threads */
 		if (!thr->uncounted) {
-			if (thr == THREAD) /* Update accounting of current thread */
-				thread_update_accounting(); 
+			if (thr == THREAD) {
+				/* Update accounting of current thread */
+				thread_update_accounting();
+			} 
 			ret += thr->cycles;
 		}
@@ -377,8 +386,10 @@
 	spinlock_lock(&tasks_lock);
 	
-	printf("taskid name       ctx address    as         cycles     threads calls  callee\n");
-	printf("------ ---------- --- ---------- ---------- ---------- ------- ------ ------>\n");
-
-	for (cur = tasks_btree.leaf_head.next; cur != &tasks_btree.leaf_head; cur = cur->next) {
+	printf("taskid name       ctx address    as         cycles     threads "
+	    "calls  callee\n");
+	printf("------ ---------- --- ---------- ---------- ---------- ------- "	    "------ ------>\n");
+
+	for (cur = tasks_btree.leaf_head.next; cur != &tasks_btree.leaf_head;
+	    cur = cur->next) {
 		btree_node_t *node;
 		int i;
@@ -397,8 +408,12 @@
 			order(task_get_accounting(t), &cycles, &suffix);
 			
-			printf("%-6lld %-10s %-3ld %#10zx %#10zx %9llu%c %7zd %6zd", t->taskid, t->name, t->context, t, t->as, cycles, suffix, t->refcount, atomic_get(&t->active_calls));
+			printf("%-6lld %-10s %-3ld %#10zx %#10zx %9llu%c %7zd "
+			    "%6zd", t->taskid, t->name, t->context, t, t->as,
+			    cycles, suffix, t->refcount,
+			    atomic_get(&t->active_calls));
 			for (j = 0; j < IPC_MAX_PHONES; j++) {
 				if (t->phones[j].callee)
-					printf(" %zd:%#zx", j, t->phones[j].callee);
+					printf(" %zd:%#zx", j,
+					    t->phones[j].callee);
 			}
 			printf("\n");
@@ -466,8 +481,9 @@
 	
 	if (t != THREAD) {
-		ASSERT(t != main_thread);	/* uninit is joined and detached in ktaskgc */
+		ASSERT(t != main_thread);	/* uninit is joined and detached
+						 * in ktaskgc */
 		thread_join(t);
 		thread_detach(t);
-		goto loop;	/* go for another thread */
+		goto loop;			/* go for another thread */
 	}
 	
@@ -498,5 +514,6 @@
 	 * therefore the thread pointer is guaranteed to be valid.
 	 */
-	if (thread_join_timeout(t, 1000000, SYNCH_FLAGS_NONE) == ESYNCH_TIMEOUT) {	/* sleep uninterruptibly here! */
+	if (thread_join_timeout(t, 1000000, SYNCH_FLAGS_NONE) ==
+	    ESYNCH_TIMEOUT) {	/* sleep uninterruptibly here! */
 		ipl_t ipl;
 		link_t *cur;
@@ -504,5 +521,6 @@
 	
 		/*
-		 * The join timed out. Try to do some garbage collection of Undead threads.
+		 * The join timed out. Try to do some garbage collection of
+		 * Undead threads.
 		 */
 more_gc:		
@@ -510,8 +528,10 @@
 		spinlock_lock(&TASK->lock);
 		
-		for (cur = TASK->th_head.next; cur != &TASK->th_head; cur = cur->next) {
+		for (cur = TASK->th_head.next; cur != &TASK->th_head;
+		    cur = cur->next) {
 			thr = list_get_instance(cur, thread_t, th_link);
 			spinlock_lock(&thr->lock);
-			if (thr != t && thr->state == Undead && thr->join_type == None) {
+			if (thr != t && thr->state == Undead &&
+			    thr->join_type == None) {
 				thr->join_type = TaskGC;
 				spinlock_unlock(&thr->lock);
Index: kernel/generic/src/proc/thread.c
===================================================================
--- kernel/generic/src/proc/thread.c	(revision df4ed852a2d1b242f9bdce0a873009a2cb77cec7)
+++ kernel/generic/src/proc/thread.c	(revision 1ba41c5ae41f66c7fa3ef1caef4b77d414202fb3)
@@ -205,9 +205,9 @@
 	atomic_set(&nrdy,0);
 	thread_slab = slab_cache_create("thread_slab", sizeof(thread_t), 0,
-		thr_constructor, thr_destructor, 0);
+	    thr_constructor, thr_destructor, 0);
 
 #ifdef ARCH_HAS_FPU
 	fpu_context_slab = slab_cache_create("fpu_slab", sizeof(fpu_context_t),
-		FPU_CONTEXT_ALIGN, NULL, NULL, 0);
+	    FPU_CONTEXT_ALIGN, NULL, NULL, 0);
 #endif
 
@@ -329,5 +329,5 @@
 	/* Not needed, but good for debugging */
 	memsetb((uintptr_t) t->kstack, THREAD_STACK_SIZE * 1 << STACK_FRAMES,
-		0);
+	    0);
 	
 	ipl = interrupts_disable();
@@ -339,5 +339,5 @@
 	context_save(&t->saved_context);
 	context_set(&t->saved_context, FADDR(cushion), (uintptr_t) t->kstack,
-		THREAD_STACK_SIZE);
+	    THREAD_STACK_SIZE);
 	
 	the_initialize((the_t *) t->kstack);
@@ -405,5 +405,5 @@
 	spinlock_lock(&threads_lock);
 	btree_insert(&threads_btree, (btree_key_t) ((uintptr_t) t), (void *) t,
-		NULL);
+	    NULL);
 	spinlock_unlock(&threads_lock);
 	
@@ -561,8 +561,11 @@
 	spinlock_lock(&threads_lock);
 	
-	printf("tid    name       address    state    task       ctx code       stack      cycles     cpu  kstack     waitqueue\n");
-	printf("------ ---------- ---------- -------- ---------- --- ---------- ---------- ---------- ---- ---------- ----------\n");
-
-	for (cur = threads_btree.leaf_head.next; cur != &threads_btree.leaf_head; cur = cur->next) {
+	printf("tid    name       address    state    task       ctx code    "
+	    "   stack      cycles     cpu  kstack     waitqueue\n");
+	printf("------ ---------- ---------- -------- ---------- --- --------"
+	    "-- ---------- ---------- ---- ---------- ----------\n");
+
+	for (cur = threads_btree.leaf_head.next;
+	    cur != &threads_btree.leaf_head; cur = cur->next) {
 		btree_node_t *node;
 		int i;
@@ -578,5 +581,8 @@
 			order(t->cycles, &cycles, &suffix);
 			
-			printf("%-6zd %-10s %#10zx %-8s %#10zx %-3ld %#10zx %#10zx %9llu%c ", t->tid, t->name, t, thread_states[t->state], t->task, t->task->context, t->thread_code, t->kstack, cycles, suffix);
+			printf("%-6zd %-10s %#10zx %-8s %#10zx %-3ld %#10zx "
+			    "%#10zx %9llu%c ", t->tid, t->name, t,
+			    thread_states[t->state], t->task, t->task->context,
+			    t->thread_code, t->kstack, cycles, suffix);
 			
 			if (t->cpu)
@@ -586,5 +592,6 @@
 			
 			if (t->state == Sleeping)
-				printf(" %#10zx %#10zx", t->kstack, t->sleep_queue);
+				printf(" %#10zx %#10zx", t->kstack,
+				    t->sleep_queue);
 			
 			printf("\n");
@@ -609,5 +616,6 @@
 	btree_node_t *leaf;
 	
-	return btree_search(&threads_btree, (btree_key_t) ((uintptr_t) t), &leaf) != NULL;
+	return btree_search(&threads_btree, (btree_key_t) ((uintptr_t) t),
+	    &leaf) != NULL;
 }
 
@@ -648,5 +656,7 @@
 	}
 
-	if ((t = thread_create(uinit, kernel_uarg, TASK, THREAD_FLAG_USPACE, namebuf, false))) {
+	t = thread_create(uinit, kernel_uarg, TASK, THREAD_FLAG_USPACE, namebuf,
+	    false);
+	if (t) {
 		tid = t->tid;
 		thread_ready(t);
@@ -671,2 +681,3 @@
 /** @}
  */
+
