Index: kernel/generic/include/syscall/syscall.h
===================================================================
--- kernel/generic/include/syscall/syscall.h	(revision 2829b3548b37cce65df20809dc2aa97fc53ae85c)
+++ kernel/generic/include/syscall/syscall.h	(revision e686744cbed5c5a5a950e59a58fbaf1ca5f0d84e)
@@ -38,5 +38,5 @@
 typedef enum {
 	SYS_IO = 0,
-	SYS_TLS_SET = 1, /* Hardcoded in AMD64, IA32 uspace - psthread.S */
+	SYS_TLS_SET = 1, /* Hardcoded in AMD64, IA32 uspace - fibril.S */
 	SYS_THREAD_CREATE,
 	SYS_THREAD_EXIT,
@@ -74,10 +74,11 @@
 #include <arch/types.h>
 
-typedef unative_t (*syshandler_t)(unative_t, unative_t, unative_t, unative_t);
+typedef unative_t (*syshandler_t)(unative_t, unative_t, unative_t, unative_t,
+    unative_t, unative_t);
 
 extern syshandler_t syscall_table[SYSCALL_END];
-extern unative_t syscall_handler(unative_t a1, unative_t a2, unative_t a3,
-				unative_t a4, unative_t id);
-extern unative_t sys_tls_set(unative_t addr);
+extern unative_t syscall_handler(unative_t, unative_t, unative_t, unative_t,
+    unative_t, unative_t, unative_t);
+extern unative_t sys_tls_set(unative_t);
 
 #endif
Index: kernel/generic/src/syscall/syscall.c
===================================================================
--- kernel/generic/src/syscall/syscall.c	(revision 2829b3548b37cce65df20809dc2aa97fc53ae85c)
+++ kernel/generic/src/syscall/syscall.c	(revision e686744cbed5c5a5a950e59a58fbaf1ca5f0d84e)
@@ -93,13 +93,13 @@
 
 /** Dispatch system call */
-unative_t syscall_handler(unative_t a1, unative_t a2, unative_t a3, unative_t a4,
-    unative_t id)
+unative_t syscall_handler(unative_t a1, unative_t a2, unative_t a3,
+    unative_t a4, unative_t a5, unative_t a6, unative_t id)
 {
 	unative_t rc;
 
 	if (id < SYSCALL_END)
-		rc = syscall_table[id](a1, a2, a3, a4);
+		rc = syscall_table[id](a1, a2, a3, a4, a5, a6);
 	else {
-		klog_printf("TASK %llu: Unknown syscall id %d", TASK->taskid,
+		klog_printf("TASK %llu: Unknown syscall id %llx", TASK->taskid,
 		    id);
 		task_kill(TASK->taskid);
Index: uspace/lib/libc/include/libc.h
===================================================================
--- uspace/lib/libc/include/libc.h	(revision 2829b3548b37cce65df20809dc2aa97fc53ae85c)
+++ uspace/lib/libc/include/libc.h	(revision e686744cbed5c5a5a950e59a58fbaf1ca5f0d84e)
@@ -40,9 +40,12 @@
 #include <libarch/syscall.h>
 
-#define __SYSCALL0(id) __syscall(0, 0, 0, 0, id)
-#define __SYSCALL1(id, p1) __syscall(p1, 0, 0, 0, id)
-#define __SYSCALL2(id, p1, p2) __syscall(p1, p2, 0, 0, id)
-#define __SYSCALL3(id, p1, p2, p3) __syscall(p1, p2, p3, 0, id)
-#define __SYSCALL4(id, p1, p2, p3, p4) __syscall(p1, p2, p3, p4, id)
+#define __SYSCALL0(id) __syscall(0, 0, 0, 0, 0, 0, id)
+#define __SYSCALL1(id, p1) __syscall(p1, 0, 0, 0, 0, 0, id)
+#define __SYSCALL2(id, p1, p2) __syscall(p1, p2, 0, 0, 0, 0, id)
+#define __SYSCALL3(id, p1, p2, p3) __syscall(p1, p2, p3, 0, 0, 0, id)
+#define __SYSCALL4(id, p1, p2, p3, p4) __syscall(p1, p2, p3, p4, 0, 0, id)
+#define __SYSCALL5(id, p1, p2, p3, p4, p5) __syscall(p1, p2, p3, p4, p5, 0, id)
+#define __SYSCALL6(id, p1, p2, p3, p4, p5, p6) \
+    __syscall(p1, p2, p3, p4, p5, p6,id)
 
 extern void __main(void);
Index: uspace/lib/libc/include/syscall.h
===================================================================
--- uspace/lib/libc/include/syscall.h	(revision 2829b3548b37cce65df20809dc2aa97fc53ae85c)
+++ uspace/lib/libc/include/syscall.h	(revision e686744cbed5c5a5a950e59a58fbaf1ca5f0d84e)
@@ -32,5 +32,6 @@
 /**
  * @file
- * @brief	Syscall function declaration for architectures that don't inline syscalls.
+ * @brief	Syscall function declaration for architectures that don't
+ *		inline syscalls.
  */
 
@@ -41,5 +42,7 @@
 #include <kernel/syscall/syscall.h>
 
-extern sysarg_t __syscall(const sysarg_t p1, const sysarg_t p2, const sysarg_t p3, const sysarg_t p4, const syscall_t id);
+extern sysarg_t __syscall(const sysarg_t p1, const sysarg_t p2,
+    const sysarg_t p3, const sysarg_t p4, const sysarg_t p5, const sysarg_t p6,
+    const syscall_t id);
 
 #endif
