Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] renaming almost all tracing files in src/instr
[simgrid.git] / src / instr / instr_simdag.c
diff --git a/src/instr/instr_simdag.c b/src/instr/instr_simdag.c
new file mode 100644 (file)
index 0000000..741ef8d
--- /dev/null
@@ -0,0 +1,29 @@
+/* Copyright (c) 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. */
+
+#include "instr/instr_private.h"
+
+#ifdef HAVE_TRACING
+
+void TRACE_sd_task_create(SD_task_t task)
+{
+  task->category = NULL;
+}
+
+void TRACE_sd_task_destroy(SD_task_t task)
+{
+  xbt_free(task->category);
+}
+
+void TRACE_sd_set_task_category(SD_task_t task, const char *category)
+{
+  if (!IS_TRACING)
+    return;
+  task->category = xbt_new(char, strlen(category) + 1);
+  strcpy(task->category, category);
+}
+
+#endif