Index: uspace/libc/generic/thread.c
===================================================================
--- uspace/libc/generic/thread.c	(revision dd655970297ee2f6828bb8e35ef9b3c181b18b45)
+++ uspace/libc/generic/thread.c	(revision f74bbaf20e8d8be55495c56affc5b17ef6ea2bf0)
@@ -125,8 +125,9 @@
  * @param arg Argument to be passed to thread.
  * @param name Symbolic name of the thread.
- *
- * @return TID of the new thread on success or -1 on failure.
- */
-int thread_create(void (* function)(void *), void *arg, char *name)
+ * @param tid Thread ID of the newly created thread.
+ *
+ * @return Zero on success or a code from @ref errno.h on failure.
+ */
+int thread_create(void (* function)(void *), void *arg, char *name, thread_id_t *tid)
 {
 	char *stack;
@@ -149,5 +150,5 @@
 	uarg->uspace_uarg = uarg;
 	
-	return __SYSCALL2(SYS_THREAD_CREATE, (sysarg_t) uarg, (sysarg_t) name);
+	return __SYSCALL3(SYS_THREAD_CREATE, (sysarg_t) uarg, (sysarg_t) name, (sysarg_t) tid);
 }
 
@@ -167,5 +168,5 @@
  * @param thread TID.
  */
-void thread_detach(int thread)
+void thread_detach(thread_id_t thread)
 {
 }
@@ -179,5 +180,5 @@
  * @return Thread exit status.
  */
-int thread_join(int thread)
+int thread_join(thread_id_t thread)
 {
 }
@@ -187,7 +188,11 @@
  * @return Current thread ID.
  */
-int thread_get_id(void)
-{
-	return __SYSCALL0(SYS_THREAD_GET_ID);
+thread_id_t thread_get_id(void)
+{
+	thread_id_t thread_id;
+
+	(void) __SYSCALL1(SYS_THREAD_GET_ID, (sysarg_t) &thread_id);
+
+	return thread_id;
 }
 
