Index: kernel/generic/src/proc/task.c
===================================================================
--- kernel/generic/src/proc/task.c	(revision 96b02eb9b2f96f3843b8275c254c43a9cb6c8c88)
+++ kernel/generic/src/proc/task.c	(revision 47a7174f4f58dd21b824f6c9cb7ae371022d6c01)
@@ -290,13 +290,15 @@
 }
 
-/** Syscall for reading task ID from userspace.
- *
- * @param uspace_task_id Userspace address of 8-byte buffer
- *                       where to store current task ID.
+#ifdef __32_BITS__
+
+/** Syscall for reading task ID from userspace (32 bits)
+ *
+ * @param uspace_taskid Pointer to user-space buffer
+ *                      where to store current task ID.
  *
  * @return Zero on success or an error code from @ref errno.h.
  *
  */
-sysarg_t sys_task_get_id(task_id_t *uspace_task_id)
+sysarg_t sys_task_get_id(sysarg64_t *uspace_taskid)
 {
 	/*
@@ -304,7 +306,27 @@
 	 * the lifespan of the task.
 	 */
-	return (sysarg_t) copy_to_uspace(uspace_task_id, &TASK->taskid,
+	return (sysarg_t) copy_to_uspace(uspace_taskid, &TASK->taskid,
 	    sizeof(TASK->taskid));
 }
+
+#endif  /* __32_BITS__ */
+
+#ifdef __64_BITS__
+
+/** Syscall for reading task ID from userspace (64 bits)
+ *
+ * @return Current task ID.
+ *
+ */
+sysarg_t sys_task_get_id(void)
+{
+	/*
+	 * No need to acquire lock on TASK because taskid remains constant for
+	 * the lifespan of the task.
+	 */
+	return TASK->taskid;
+}
+
+#endif  /* __64_BITS__ */
 
 /** Syscall for setting the task name.
