Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix copyright headers
[simgrid.git] / src / simdag / sd_task.c
index a313d5e..1196233 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) 2007-2009 Da SimGrid Team.  All rights reserved.           */
+/* Copyright (c) 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+ * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -168,6 +169,12 @@ const char *SD_task_get_name(SD_task_t task)
   return task->name;
 }
 
+/** @brief Allows to change the name of a task */
+void SD_task_set_name(SD_task_t task, const char *name) {
+  xbt_free(task->name);
+  task->name = xbt_strdup(name);
+}
+
 /** @brief Returns the dynar of the parents of a task
  *
  * \param task a task