Index: uspace/lib/c/generic/ps.c
===================================================================
--- uspace/lib/c/generic/ps.c	(revision faf38b24fb042fe9f1d90d5bb4cc3c9364782df0)
+++ uspace/lib/c/generic/ps.c	(revision 95319bd04e17f7e1bb127fdbbfb754cd00dda2b6)
@@ -71,8 +71,9 @@
  * @param size		Size of the infos array.
  *
- * @return 		0 on success.
+ * @return		Count of written thread_infos. If higher than size, there
+ * 			was not enough space.
  *
  */
-int get_task_threads(thread_info_t *infos, size_t size)
+size_t get_task_threads(thread_info_t *infos, size_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 faf38b24fb042fe9f1d90d5bb4cc3c9364782df0)
+++ uspace/lib/c/include/ps.h	(revision 95319bd04e17f7e1bb127fdbbfb754cd00dda2b6)
@@ -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(thread_info_t *infos, size_t size);
+extern size_t get_task_threads(thread_info_t *infos, size_t size);
 
 #endif
