Index: kernel/generic/src/proc/task.c
===================================================================
--- kernel/generic/src/proc/task.c	(revision 55cc9bc9a819800533b1cf9d98b6af133c704c37)
+++ kernel/generic/src/proc/task.c	(revision aeaebcc155defcfcb8ff9cf60ddacb07fd8e84a7)
@@ -221,5 +221,5 @@
 	 * Create the main thread.
 	 */
-	t1 = thread_create(uinit, kernel_uarg, task, THREAD_FLAG_USPACE, "uinit");
+	t1 = thread_create(uinit, kernel_uarg, task, THREAD_FLAG_USPACE, "uinit", false);
 	ASSERT(t1);
 	
@@ -227,5 +227,5 @@
 	 * Create killer thread for the new task.
 	 */
-	t2 = thread_create(ktaskgc, t1, task, 0, "ktaskgc");
+	t2 = thread_create(ktaskgc, t1, task, 0, "ktaskgc", true);
 	ASSERT(t2);
 	thread_ready(t2);
@@ -286,9 +286,10 @@
 		
 		spinlock_lock(&thr->lock);
-		
-		if (thr == THREAD) /* Update accounting of current thread */
-			thread_update_accounting(); 
-		ret += thr->cycles;
-		
+		/* Process only counted threads */
+		if (!thr->uncounted) {
+			if (thr == THREAD) /* Update accounting of current thread */
+				thread_update_accounting(); 
+			ret += thr->cycles;
+		}
 		spinlock_unlock(&thr->lock);
 	}
@@ -329,5 +330,5 @@
 	spinlock_unlock(&tasks_lock);
 	
-	t = thread_create(ktaskclnp, NULL, ta, 0, "ktaskclnp");
+	t = thread_create(ktaskclnp, NULL, ta, 0, "ktaskclnp", true);
 	
 	spinlock_lock(&ta->lock);
Index: kernel/generic/src/proc/thread.c
===================================================================
--- kernel/generic/src/proc/thread.c	(revision 55cc9bc9a819800533b1cf9d98b6af133c704c37)
+++ kernel/generic/src/proc/thread.c	(revision aeaebcc155defcfcb8ff9cf60ddacb07fd8e84a7)
@@ -124,12 +124,15 @@
 	
 	spinlock_lock(&THREAD->lock);
-	thread_update_accounting();
-	uint64_t cycles = THREAD->cycles;
-	THREAD->cycles = 0;
-	spinlock_unlock(&THREAD->lock);
-	
-	spinlock_lock(&TASK->lock);
-	TASK->cycles += cycles;
-	spinlock_unlock(&TASK->lock);
+	if (!THREAD->uncounted) {
+		thread_update_accounting();
+		uint64_t cycles = THREAD->cycles;
+		THREAD->cycles = 0;
+		spinlock_unlock(&THREAD->lock);
+		
+		spinlock_lock(&TASK->lock);
+		TASK->cycles += cycles;
+		spinlock_unlock(&TASK->lock);
+	} else
+		spinlock_unlock(&THREAD->lock);
 	
 	interrupts_restore(ipl);
@@ -303,14 +306,15 @@
  * 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.
- * @param name  Symbolic name.
+ * @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.
+ * @param name      Symbolic name.
+ * @param uncounted Thread's accounting doesn't affect accumulated task accounting.
  *
  * @return New thread's structure on success, NULL on failure.
  *
  */
-thread_t *thread_create(void (* func)(void *), void *arg, task_t *task, int flags, char *name)
+thread_t *thread_create(void (* func)(void *), void *arg, task_t *task, int flags, char *name, bool uncounted)
 {
 	thread_t *t;
@@ -345,4 +349,5 @@
 	t->ticks = -1;
 	t->cycles = 0;
+	t->uncounted = uncounted;
 	t->priority = -1;		/* start in rq[0] */
 	t->cpu = NULL;
@@ -650,5 +655,5 @@
 	}
 
-	if ((t = thread_create(uinit, kernel_uarg, TASK, THREAD_FLAG_USPACE, namebuf))) {
+	if ((t = thread_create(uinit, kernel_uarg, TASK, THREAD_FLAG_USPACE, namebuf, false))) {
 		tid = t->tid;
 		thread_ready(t);
