Index: kernel/generic/include/ipc/event_types.h
===================================================================
--- kernel/generic/include/ipc/event_types.h	(revision 6aef742decd89d81867a15d93f8956293e6f30e0)
+++ kernel/generic/include/ipc/event_types.h	(revision 9fec913f8d3f50205fec6764b0642b2ba4a893d9)
@@ -41,5 +41,5 @@
 	/** Returning from kernel console to userspace */
 	EVENT_KCONSOLE,
-	/** A thread has faulted and will be terminated */
+	/** A task/thread has faulted and will be terminated */
 	EVENT_FAULT,
 	EVENT_END
Index: kernel/generic/include/proc/task.h
===================================================================
--- kernel/generic/include/proc/task.h	(revision 6aef742decd89d81867a15d93f8956293e6f30e0)
+++ kernel/generic/include/proc/task.h	(revision 9fec913f8d3f50205fec6764b0642b2ba4a893d9)
@@ -131,4 +131,5 @@
 extern task_t *task_find_by_id(task_id_t);
 extern int task_kill(task_id_t);
+extern void task_kill_self(bool) __attribute__((noreturn));
 extern void task_get_accounting(task_t *, uint64_t *, uint64_t *);
 extern void task_print_list(bool);
@@ -155,4 +156,5 @@
 extern sysarg_t sys_task_set_name(const char *, size_t);
 extern sysarg_t sys_task_kill(task_id_t *);
+extern sysarg_t sys_task_exit(sysarg_t);
 
 #endif
Index: kernel/generic/include/syscall/syscall.h
===================================================================
--- kernel/generic/include/syscall/syscall.h	(revision 6aef742decd89d81867a15d93f8956293e6f30e0)
+++ kernel/generic/include/syscall/syscall.h	(revision 9fec913f8d3f50205fec6764b0642b2ba4a893d9)
@@ -48,4 +48,5 @@
 	SYS_TASK_SET_NAME,
 	SYS_TASK_KILL,
+	SYS_TASK_EXIT,
 	SYS_PROGRAM_SPAWN_LOADER,
 	
Index: kernel/generic/src/interrupt/interrupt.c
===================================================================
--- kernel/generic/src/interrupt/interrupt.c	(revision 6aef742decd89d81867a15d93f8956293e6f30e0)
+++ kernel/generic/src/interrupt/interrupt.c	(revision 9fec913f8d3f50205fec6764b0642b2ba4a893d9)
@@ -45,5 +45,4 @@
 #include <console/console.h>
 #include <console/cmd.h>
-#include <ipc/event.h>
 #include <synch/mutex.h>
 #include <time/delay.h>
@@ -188,23 +187,5 @@
 	printf("\n");
 	
-	/*
-	 * Userspace can subscribe for FAULT events to take action
-	 * whenever a thread faults. (E.g. take a dump, run a debugger).
-	 * The notification is always available, but unless Udebug is enabled,
-	 * that's all you get.
-	 */
-	if (event_is_subscribed(EVENT_FAULT)) {
-		/* Notify the subscriber that a fault occurred. */
-		event_notify_3(EVENT_FAULT, LOWER32(TASK->taskid),
-		    UPPER32(TASK->taskid), (sysarg_t) THREAD);
-		
-#ifdef CONFIG_UDEBUG
-		/* Wait for a debugging session. */
-		udebug_thread_fault();
-#endif
-	}
-	
-	task_kill(TASK->taskid);
-	thread_exit();
+	task_kill_self(true);
 }
 
Index: kernel/generic/src/proc/task.c
===================================================================
--- kernel/generic/src/proc/task.c	(revision 6aef742decd89d81867a15d93f8956293e6f30e0)
+++ kernel/generic/src/proc/task.c	(revision 9fec913f8d3f50205fec6764b0642b2ba4a893d9)
@@ -384,10 +384,8 @@
 {
 	task_id_t taskid;
-	int rc;
-
-	rc = copy_from_uspace(&taskid, uspace_taskid, sizeof(taskid));
+	int rc = copy_from_uspace(&taskid, uspace_taskid, sizeof(taskid));
 	if (rc != 0)
 		return (sysarg_t) rc;
-
+	
 	return (sysarg_t) task_kill(taskid);
 }
@@ -520,4 +518,52 @@
 }
 
+/** Kill the currently running task.
+ *
+ * @param notify Send out fault notifications.
+ *
+ * @return Zero on success or an error code from errno.h.
+ *
+ */
+void task_kill_self(bool notify)
+{
+	/*
+	 * User space can subscribe for FAULT events to take action
+	 * whenever a task faults (to take a dump, run a debugger, etc.).
+	 * The notification is always available, but unless udebug is enabled,
+	 * that's all you get.
+	*/
+	if (notify) {
+		if (event_is_subscribed(EVENT_FAULT)) {
+			/* Notify the subscriber that a fault occurred. */
+			event_notify_3(EVENT_FAULT, LOWER32(TASK->taskid),
+			    UPPER32(TASK->taskid), (sysarg_t) THREAD);
+		
+#ifdef CONFIG_UDEBUG
+			/* Wait for a debugging session. */
+			udebug_thread_fault();
+#endif
+		}
+	}
+	
+	irq_spinlock_lock(&tasks_lock, true);
+	task_kill_internal(TASK);
+	irq_spinlock_unlock(&tasks_lock, true);
+	
+	thread_exit();
+}
+
+/** Process syscall to terminate the current task.
+ *
+ * @param notify Send out fault notifications.
+ *
+ */
+sysarg_t sys_task_exit(sysarg_t notify)
+{
+	task_kill_self(notify);
+	
+	/* Unreachable */
+	return EOK;
+}
+
 static bool task_print_walker(avltree_node_t *node, void *arg)
 {
Index: kernel/generic/src/syscall/syscall.c
===================================================================
--- kernel/generic/src/syscall/syscall.c	(revision 6aef742decd89d81867a15d93f8956293e6f30e0)
+++ kernel/generic/src/syscall/syscall.c	(revision 9fec913f8d3f50205fec6764b0642b2ba4a893d9)
@@ -86,6 +86,5 @@
 	} else {
 		printf("Task %" PRIu64": Unknown syscall %#" PRIxn, TASK->taskid, id);
-		task_kill(TASK->taskid);
-		thread_exit();
+		task_kill_self(true);
 	}
 	
@@ -131,4 +130,5 @@
 	(syshandler_t) sys_task_set_name,
 	(syshandler_t) sys_task_kill,
+	(syshandler_t) sys_task_exit,
 	(syshandler_t) sys_program_spawn_loader,
 	
