Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
535834d47cbaf753c3b9a1b362dd701bdc33b8c6
[simgrid.git] / src / instr / sd_instr.c
1 /* Copyright (c) 2010. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5   * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #include "instr/private.h"
8
9 #ifdef HAVE_TRACING
10
11 void TRACE_sd_task_create(SD_task_t task)
12 {
13   task->category = NULL;
14 }
15
16 void TRACE_sd_task_destroy(SD_task_t task)
17 {
18   xbt_free(task->category);
19 }
20
21 void TRACE_sd_set_task_category(SD_task_t task, const char *category)
22 {
23   if (!IS_TRACING)
24     return;
25   task->category = xbt_new(char, strlen(category) + 1);
26   strcpy(task->category, category);
27 }
28
29 #endif