return t->notification;
}
+/**
+ * Return the status value of a task.
+ *
+ * \param t The task to get the status value from.
+ *
+ * \return Zero if task does not exist, one if task is running, negative error
+ * code if task has terminated.
+ */
+int task_status(const struct task *t)
+{
+ if (!t)
+ return 0;
+ if (t->dead)
+ return 0;
+ if (t->error >= 0)
+ return 1;
+ return t->error;
+}
+
/**
* Set the notification value of all tasks of a scheduler instance.
*