-/* Returns the state of a task: SD_NOT_SCHEDULED, SD_SCHEDULED, SD_RUNNING, SD_DONE or SD_FAILED.
+/**
+ * \brief Sets the user data of a task
+ *
+ * The new data can be \c NULL. The old data should have been freed first
+ * if it was not \c NULL.
+ *
+ * \param task a task
+ * \param data the new data you want to associate with this task
+ * \see SD_task_get_data()
+ */
+void SD_task_set_data(SD_task_t task, void *data) {
+ SD_CHECK_INIT_DONE();
+ xbt_assert0(task != NULL, "Invalid parameter");
+ task->data = data;
+}
+
+/**
+ * \brief Returns the state of a task
+ *
+ * \param task a task
+ * \return the current \ref e_SD_task_state_t "state" of this task:
+ * #SD_NOT_SCHEDULED, #SD_SCHEDULED, #SD_READY, #SD_RUNNING, #SD_DONE or #SD_FAILED
+ * \see e_SD_task_state_t