+/**
+ * Get the list of all registered tasks.
+ *
+ * \return The task list.
+ *
+ * Each entry of the list contains an identifier which is simply a hex number
+ * that may be used in \a kill_task() to terminate the task.
+ * The result ist dynamically allocated and must be freed by the caller.
+ */
+char *get_task_list(void)
+{
+ struct task *t, *tmp;
+ char *msg = NULL;
+
+ if (!initialized)
+ return NULL;
+ list_for_each_entry_safe(t, tmp, &pre_select_list, pre_select_node) {
+ char *tmp_msg;
+ tmp_msg = make_message("%s%p\tpre\t%s\n", msg? msg : "", t, t->status);
+ free(msg);
+ msg = tmp_msg;
+ }
+ list_for_each_entry_safe(t, tmp, &post_select_list, post_select_node) {
+ char *tmp_msg;
+// if (t->pre_select)
+// continue;
+ tmp_msg = make_message("%s%p\tpost\t%s\n", msg? msg : "", t, t->status);
+ free(msg);
+ msg = tmp_msg;
+ }
+ //PARA_DEBUG_LOG("task list:\n%s", msg);
+ return msg;
+}
+
+/**
+ * Simulate an error for the given task.
+ *
+ * \param id The task identifier.
+ *
+ * Find the task identified by \a id, set the tasks' error value to
+ * \p -E_TASK_KILLED and unregister the task.
+ *
+ * \return Positive on success, negative on errors (e.g. if \a id does not
+ * correspond to a registered task).
+ */
+int kill_task(char *id)
+{
+ struct task *t, *tmp;
+ char buf[20];