X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/653a39ca9cbfe9bed2b9a13859772c5fb576d8da..89adb94b2db11767256ccfac6c8b7097e88a14a6:/src/instr/categories.c diff --git a/src/instr/categories.c b/src/instr/categories.c index e34f83e388..f1e37b2273 100644 --- a/src/instr/categories.c +++ b/src/instr/categories.c @@ -10,44 +10,44 @@ static xbt_dict_t current_task_category = NULL; -void TRACE_category_alloc () +void TRACE_category_alloc() { current_task_category = xbt_dict_new(); } -void TRACE_category_release () +void TRACE_category_release() { - xbt_dict_free (¤t_task_category); + xbt_dict_free(¤t_task_category); } -void TRACE_category_set (smx_process_t proc, const char *category) +void TRACE_category_set(smx_process_t proc, const char *category) { char processid[100]; char *var_cpy = NULL; - snprintf (processid, 100, "%p", proc); - var_cpy = xbt_strdup (category); - xbt_dict_set (current_task_category, processid, var_cpy, xbt_free); + snprintf(processid, 100, "%p", proc); + var_cpy = xbt_strdup(category); + xbt_dict_set(current_task_category, processid, var_cpy, xbt_free); } -char *TRACE_category_get (smx_process_t proc) +char *TRACE_category_get(smx_process_t proc) { char processid[100]; - snprintf (processid, 100, "%p", proc); - return xbt_dict_get_or_null (current_task_category, processid); + snprintf(processid, 100, "%p", proc); + return xbt_dict_get_or_null(current_task_category, processid); } -void TRACE_category_unset (smx_process_t proc) +void TRACE_category_unset(smx_process_t proc) { char processid[100]; - snprintf (processid, 100, "%p", proc); - if (xbt_dict_get_or_null (current_task_category, processid) != NULL){ - xbt_dict_remove (current_task_category, processid); + snprintf(processid, 100, "%p", proc); + if (xbt_dict_get_or_null(current_task_category, processid) != NULL) { + xbt_dict_remove(current_task_category, processid); } } -void TRACE_msg_category_set (smx_process_t proc, m_task_t task) +void TRACE_msg_category_set(smx_process_t proc, m_task_t task) { - TRACE_category_set (proc, task->category); + TRACE_category_set(proc, task->category); }