Index: uspace/app/ps/ps.c
===================================================================
--- uspace/app/ps/ps.c	(revision a325832e40265e1eb176995bec5cf79d579eb46c)
+++ uspace/app/ps/ps.c	(revision faf38b24fb042fe9f1d90d5bb4cc3c9364782df0)
@@ -99,10 +99,10 @@
 	int thread_count = THREAD_COUNT;
 	thread_info_t *threads = malloc(thread_count * sizeof(thread_info_t));
-	int result = get_task_threads(taskid, threads, sizeof(thread_info_t) * thread_count);
+	int result = get_task_threads(threads, sizeof(thread_info_t) * thread_count);
 
 	while (result > thread_count) {
 		thread_count *= 2;
 		threads = realloc(threads, thread_count * sizeof(thread_info_t));
-		result = get_task_threads(taskid, threads, sizeof(thread_info_t) * thread_count);
+		result = get_task_threads(threads, sizeof(thread_info_t) * thread_count);
 	}
 
@@ -115,4 +115,7 @@
 	printf("    ID    State  CPU   Prio    [k]uCycles    [k]kcycles   Cycle fault\n");
 	for (i = 0; i < result; ++i) {
+		if (threads[i].taskid != taskid) {
+			continue;
+		}
 		uint64_t ucycles, kcycles;
 		char usuffix, ksuffix;
Index: uspace/app/top/ps.c
===================================================================
--- uspace/app/top/ps.c	(revision a325832e40265e1eb176995bec5cf79d579eb46c)
+++ uspace/app/top/ps.c	(revision faf38b24fb042fe9f1d90d5bb4cc3c9364782df0)
@@ -86,10 +86,10 @@
 	int thread_count = THREAD_COUNT;
 	thread_info_t *threads = malloc(thread_count * sizeof(thread_info_t));
-	int result = get_task_threads(taskid, threads, sizeof(thread_info_t) * thread_count);
+	int result = get_task_threads(threads, sizeof(thread_info_t) * thread_count);
 
 	while (result > thread_count) {
 		thread_count *= 2;
 		threads = realloc(threads, thread_count * sizeof(thread_info_t));
-		result = get_task_threads(taskid, threads, sizeof(thread_info_t) * thread_count);
+		result = get_task_threads(threads, sizeof(thread_info_t) * thread_count);
 	}
 	
Index: uspace/lib/c/generic/ps.c
===================================================================
--- uspace/lib/c/generic/ps.c	(revision a325832e40265e1eb176995bec5cf79d579eb46c)
+++ uspace/lib/c/generic/ps.c	(revision faf38b24fb042fe9f1d90d5bb4cc3c9364782df0)
@@ -74,8 +74,7 @@
  *
  */
-int get_task_threads(task_id_t taskid, thread_info_t *infos, size_t size)
+int get_task_threads(thread_info_t *infos, size_t size)
 {
-	return __SYSCALL3(SYS_PS_GET_THREADS, (sysarg_t) &taskid, (sysarg_t) infos,
-			(sysarg_t) size);
+	return __SYSCALL2(SYS_PS_GET_THREADS, (sysarg_t) infos, (sysarg_t) size);
 }
 
Index: uspace/lib/c/include/ps.h
===================================================================
--- uspace/lib/c/include/ps.h	(revision a325832e40265e1eb176995bec5cf79d579eb46c)
+++ uspace/lib/c/include/ps.h	(revision faf38b24fb042fe9f1d90d5bb4cc3c9364782df0)
@@ -45,5 +45,5 @@
 extern size_t get_task_ids(task_id_t *ids, size_t size);
 extern int get_task_info(task_id_t id, task_info_t *info);
-extern int get_task_threads(task_id_t taskid, thread_info_t *infos, size_t size);
+extern int get_task_threads(thread_info_t *infos, size_t size);
 
 #endif
