From 6a6157abf9619875297ff1d16c1e5c63c526d4c1 Mon Sep 17 00:00:00 2001 From: agiersch Date: Thu, 17 Feb 2011 16:12:14 +0000 Subject: [PATCH 1/1] Make XBT_{IN,OUT,HERE} function-like macros. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9655 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- include/xbt/log.h | 14 ++----- src/gras/DataDesc/ddt_create.c | 34 +++++++-------- src/gras/DataDesc/ddt_parse.c | 50 +++++++++++------------ src/gras/Transport/rl_transport.c | 2 +- src/gras/Transport/transport.c | 16 ++++---- src/gras/Transport/transport_plugin_sg.c | 6 +-- src/gras/Transport/transport_plugin_tcp.c | 14 +++---- src/surf/cpu.c | 32 +++++++-------- src/surf/cpu_im.c | 32 +++++++-------- src/surf/cpu_ti.c | 28 ++++++------- src/surf/lagrange.c | 10 ++--- src/surf/maxmin.c | 24 +++++------ src/surf/network.c | 4 +- src/surf/network_constant.c | 4 +- src/surf/network_gtnets.c | 4 +- src/surf/network_im.c | 4 +- src/surf/surf_action.c | 4 +- src/surf/workstation_ptask_L07.c | 24 +++++------ src/xbt/config.c | 2 +- src/xbt/log.c | 3 +- 20 files changed, 152 insertions(+), 159 deletions(-) diff --git a/include/xbt/log.h b/include/xbt/log.h index 806c341a29..1fa3d4de49 100644 --- a/include/xbt/log.h +++ b/include/xbt/log.h @@ -501,18 +501,12 @@ extern xbt_log_layout_t xbt_log_default_layout; */ #define XBT_CRITICAL(...) XBT_LOG(xbt_log_priority_critical, __VA_ARGS__) -/** @ingroup XBT_log - * @hideinitializer - * @brief Log at TRACE priority that we entered in current function. - */ -#define XBT_IN XBT_IN_F("") - /** @ingroup XBT_log * @hideinitializer * @brief Log at TRACE priority that we entered in current function, appending a user specified format. */ -#define XBT_IN_F(...) XBT_IN_F_(__VA_ARGS__, "") -#define XBT_IN_F_(fmt, ...) \ +#define XBT_IN(...) XBT_IN_(__VA_ARGS__, "") +#define XBT_IN_(fmt, ...) \ XBT_LOG(xbt_log_priority_trace, ">> begin of %s" fmt "%s", \ _XBT_FUNCTION, __VA_ARGS__) @@ -520,13 +514,13 @@ extern xbt_log_layout_t xbt_log_default_layout; * @hideinitializer * @brief Log at TRACE priority that we exited the current function. */ -#define XBT_OUT XBT_LOG(xbt_log_priority_trace, "<< end of %s", _XBT_FUNCTION) +#define XBT_OUT() XBT_LOG(xbt_log_priority_trace, "<< end of %s", _XBT_FUNCTION) /** @ingroup XBT_log * @hideinitializer * @brief Log at TRACE priority a message indicating that we reached that point. */ -#define XBT_HERE XBT_LOG(xbt_log_priority_trace, "-- was here") +#define XBT_HERE() XBT_LOG(xbt_log_priority_trace, "-- was here") SG_END_DECL() #endif /* ! _XBT_LOG_H_ */ diff --git a/src/gras/DataDesc/ddt_create.c b/src/gras/DataDesc/ddt_create.c index 3dbd91a608..3d6e18aff8 100644 --- a/src/gras/DataDesc/ddt_create.c +++ b/src/gras/DataDesc/ddt_create.c @@ -34,7 +34,7 @@ static gras_datadesc_type_t gras_ddt_new(const char *name) { gras_datadesc_type_t res; - XBT_IN_F("(%s)", name); + XBT_IN("(%s)", name); res = xbt_new0(s_gras_datadesc_type_t, 1); res->name = (char *) strdup(name); @@ -43,7 +43,7 @@ static gras_datadesc_type_t gras_ddt_new(const char *name) xbt_set_add(gras_datadesc_set_local, (xbt_set_elm_t) res, gras_ddt_freev); - XBT_OUT; + XBT_OUT(); return res; } @@ -119,7 +119,7 @@ gras_datadesc_scalar(const char *name, gras_datadesc_type_t res; long int arch; - XBT_IN; + XBT_IN(""); res = gras_datadesc_by_name_or_null(name); if (res) { xbt_assert1(res->category_code == e_gras_datadesc_type_cat_scalar, @@ -143,7 +143,7 @@ gras_datadesc_scalar(const char *name, res->category_code = e_gras_datadesc_type_cat_scalar; res->category.scalar_data.encoding = encoding; res->category.scalar_data.type = type; - XBT_OUT; + XBT_OUT(); return res; } @@ -153,13 +153,13 @@ gras_datadesc_scalar(const char *name, void gras_dd_cat_field_free(void *f) { gras_dd_cat_field_t field = *(gras_dd_cat_field_t *) f; - XBT_IN; + XBT_IN(""); if (field) { if (field->name) free(field->name); free(field); } - XBT_OUT; + XBT_OUT(); } /** \brief Declare a new structure description */ @@ -169,7 +169,7 @@ gras_datadesc_type_t gras_datadesc_struct(const char *name) gras_datadesc_type_t res; long int arch; - XBT_IN_F("(%s)", name); + XBT_IN("(%s)", name); res = gras_datadesc_by_name_or_null(name); if (res) { /* FIXME: Check that field redefinition matches */ @@ -189,7 +189,7 @@ gras_datadesc_type_t gras_datadesc_struct(const char *name) res->category.struct_data.fields = xbt_dynar_new(sizeof(gras_dd_cat_field_t), gras_dd_cat_field_free); - XBT_OUT; + XBT_OUT(); return res; } @@ -206,7 +206,7 @@ gras_datadesc_struct_append(gras_datadesc_type_t struct_type, xbt_assert2(field_type, "Cannot add the field '%s' into struct '%s': its type is NULL", name, struct_type->name); - XBT_IN_F("(%s %s.%s;)", field_type->name, struct_type->name, name); + XBT_IN("(%s %s.%s;)", field_type->name, struct_type->name, name); if (struct_type->category.struct_data.closed) { XBT_DEBUG ("Ignoring request to add field to struct %s (closed. Redefinition?)", @@ -256,7 +256,7 @@ gras_datadesc_struct_append(gras_datadesc_type_t struct_type, struct_type->size[GRAS_THISARCH], struct_type->alignment[GRAS_THISARCH], struct_type->aligned_size[GRAS_THISARCH]); - XBT_OUT; + XBT_OUT(); } /** \brief Close a structure description @@ -266,7 +266,7 @@ gras_datadesc_struct_append(gras_datadesc_type_t struct_type, void gras_datadesc_struct_close(gras_datadesc_type_t struct_type) { int arch; - XBT_IN; + XBT_IN(""); struct_type->category.struct_data.closed = 1; for (arch = 0; arch < gras_arch_count; arch++) { struct_type->size[arch] = struct_type->aligned_size[arch]; @@ -312,7 +312,7 @@ gras_datadesc_union(const char *name, gras_datadesc_type_cb_int_t selector) gras_datadesc_type_t res; int arch; - XBT_IN_F("(%s)", name); + XBT_IN("(%s)", name); xbt_assert0(selector, "Attempt to creat an union without field_count function"); @@ -352,7 +352,7 @@ void gras_datadesc_union_append(gras_datadesc_type_t union_type, gras_dd_cat_field_t field; int arch; - XBT_IN_F("(%s %s.%s;)", field_type->name, union_type->name, name); + XBT_IN("(%s %s.%s;)", field_type->name, union_type->name, name); xbt_assert1(field_type->size[GRAS_THISARCH] >= 0, "Cannot add a dynamically sized field in union %s", union_type->name); @@ -418,7 +418,7 @@ gras_datadesc_ref(const char *name, gras_datadesc_type_t referenced_type) gras_datadesc_by_name("data pointer"); int arch; - XBT_IN_F("(%s)", name); + XBT_IN("(%s)", name); res = gras_datadesc_by_name_or_null(name); if (res) { xbt_assert1(res->category_code == e_gras_datadesc_type_cat_ref, @@ -464,7 +464,7 @@ gras_datadesc_ref_generic(const char *name, gras_datadesc_by_name("data pointer"); int arch; - XBT_IN_F("(%s)", name); + XBT_IN("(%s)", name); res = gras_datadesc_by_name_or_null(name); if (res) { @@ -505,7 +505,7 @@ gras_datadesc_array_fixed(const char *name, gras_datadesc_type_t res; int arch; - XBT_IN_F("(%s)", name); + XBT_IN("(%s)", name); res = gras_datadesc_by_name_or_null(name); if (res) { xbt_assert1(res->category_code == e_gras_datadesc_type_cat_array, @@ -557,7 +557,7 @@ gras_datadesc_type_t gras_datadesc_array_dyn(const char *name, gras_datadesc_type_t res; int arch; - XBT_IN_F("(%s)", name); + XBT_IN("(%s)", name); xbt_assert1(dynamic_size, "'%s' is a dynamic array without size discriminant", name); diff --git a/src/gras/DataDesc/ddt_parse.c b/src/gras/DataDesc/ddt_parse.c index d6d3b3f96f..4ffcf1adff 100644 --- a/src/gras/DataDesc/ddt_parse.c +++ b/src/gras/DataDesc/ddt_parse.c @@ -42,7 +42,7 @@ extern char *gras_ddt_parse_text; /* text being considered in the parser * /* local functions */ static void parse_type_modifier(type_modifier_t type_modifier) { - XBT_IN; + XBT_IN(""); do { if (gras_ddt_parse_tok_num == GRAS_DDT_PARSE_TOKEN_STAR) { /* This only used when parsing 'short *' since this function returns when int, float, double,... is encountered */ @@ -89,14 +89,14 @@ static void parse_type_modifier(type_modifier_t type_modifier) break; } } while (1); - XBT_OUT; + XBT_OUT(); } static void print_type_modifier(s_type_modifier_t tm) { int i; - XBT_IN; + XBT_IN(""); if (tm.is_unsigned) printf("(unsigned) "); if (tm.is_short) @@ -113,7 +113,7 @@ static void print_type_modifier(s_type_modifier_t tm) for (i = 0; i < tm.is_ref; i++) printf("(ref) "); - XBT_OUT; + XBT_OUT(); } static void change_to_fixed_array(xbt_dynar_t dynar, long int size) @@ -121,7 +121,7 @@ static void change_to_fixed_array(xbt_dynar_t dynar, long int size) s_identifier_t former, array; memset(&array, 0, sizeof(array)); - XBT_IN; + XBT_IN(""); xbt_dynar_pop(dynar, &former); array.type_name = (char *) xbt_malloc(strlen(former.type->name) + 48); XBT_DEBUG("Array specification (size=%ld, elm='%s'), change pushed type", @@ -136,7 +136,7 @@ static void change_to_fixed_array(xbt_dynar_t dynar, long int size) array.name = former.name; xbt_dynar_push(dynar, &array); - XBT_OUT; + XBT_OUT(); } static void change_to_ref(xbt_dynar_t dynar) @@ -144,7 +144,7 @@ static void change_to_ref(xbt_dynar_t dynar) s_identifier_t former, ref; memset(&ref, 0, sizeof(ref)); - XBT_IN; + XBT_IN(""); xbt_dynar_pop(dynar, &former); ref.type_name = (char *) xbt_malloc(strlen(former.type->name) + 2); XBT_DEBUG("Ref specification (elm='%s'), change pushed type", @@ -156,7 +156,7 @@ static void change_to_ref(xbt_dynar_t dynar) ref.name = former.name; xbt_dynar_push(dynar, &ref); - XBT_OUT; + XBT_OUT(); } static void change_to_ref_pop_array(xbt_dynar_t dynar) @@ -164,7 +164,7 @@ static void change_to_ref_pop_array(xbt_dynar_t dynar) s_identifier_t former, ref; memset(&ref, 0, sizeof(ref)); - XBT_IN; + XBT_IN(""); xbt_dynar_pop(dynar, &former); ref.type = gras_datadesc_ref_pop_arr(former.type); /* redeclaration are ignored */ ref.type_name = (char *) strdup(ref.type->name); @@ -173,7 +173,7 @@ static void change_to_ref_pop_array(xbt_dynar_t dynar) free(former.type_name); xbt_dynar_push(dynar, &ref); - XBT_OUT; + XBT_OUT(); } static void change_to_dynar_of(xbt_dynar_t dynar, @@ -182,7 +182,7 @@ static void change_to_dynar_of(xbt_dynar_t dynar, s_identifier_t former, ref; memset(&ref, 0, sizeof(ref)); - XBT_IN; + XBT_IN(""); xbt_dynar_pop(dynar, &former); ref.type = gras_datadesc_dynar(subtype, NULL); /* redeclaration are ignored */ ref.type_name = (char *) strdup(ref.type->name); @@ -191,7 +191,7 @@ static void change_to_dynar_of(xbt_dynar_t dynar, free(former.type_name); xbt_dynar_push(dynar, &ref); - XBT_OUT; + XBT_OUT(); } static void change_to_matrix_of(xbt_dynar_t dynar, @@ -200,7 +200,7 @@ static void change_to_matrix_of(xbt_dynar_t dynar, s_identifier_t former, ref; memset(&ref, 0, sizeof(ref)); - XBT_IN; + XBT_IN(""); xbt_dynar_pop(dynar, &former); ref.type = gras_datadesc_matrix(subtype, NULL); /* redeclaration are ignored */ ref.type_name = (char *) strdup(ref.type->name); @@ -209,7 +209,7 @@ static void change_to_matrix_of(xbt_dynar_t dynar, free(former.type_name); xbt_dynar_push(dynar, &ref); - XBT_OUT; + XBT_OUT(); } static void add_free_f(xbt_dynar_t dynar, void_f_pvoid_t free_f) @@ -217,11 +217,11 @@ static void add_free_f(xbt_dynar_t dynar, void_f_pvoid_t free_f) s_identifier_t former, ref; memset(&ref, 0, sizeof(ref)); - XBT_IN; + XBT_IN(""); xbt_dynar_pop(dynar, &former); memcpy(former.type->extra, free_f, sizeof(free_f)); xbt_dynar_push(dynar, &former); - XBT_OUT; + XBT_OUT(); } static void parse_statement(char *definition, @@ -234,12 +234,12 @@ static void parse_statement(char *definition, int expect_id_separator = 0; - XBT_IN; + XBT_IN(""); memset(&identifier, 0, sizeof(identifier)); gras_ddt_parse_tok_num = gras_ddt_parse_lex_n_dump(); if (gras_ddt_parse_tok_num == GRAS_DDT_PARSE_TOKEN_RA) { - XBT_OUT; + XBT_OUT(); THROW0(mismatch_error, 0, "End of the englobing structure or union"); } @@ -595,7 +595,7 @@ static void parse_statement(char *definition, if (identifier.tm.is_dynar > 0) PARSE_ERROR0("xbt_dynar_t field without 'subtype' annotation"); - XBT_OUT; + XBT_OUT(); } static gras_datadesc_type_t parse_struct(char *definition) @@ -616,7 +616,7 @@ static gras_datadesc_type_t parse_struct(char *definition) gras_datadesc_type_t struct_type; - XBT_IN; + XBT_IN(""); identifiers = xbt_dynar_new(sizeof(s_identifier_t), NULL); fields_to_push = xbt_dynar_new(sizeof(char *), NULL); @@ -695,7 +695,7 @@ static gras_datadesc_type_t parse_struct(char *definition) xbt_dynar_free(&identifiers); xbt_dynar_free(&fields_to_push); - XBT_OUT; + XBT_OUT(); return struct_type; } @@ -707,7 +707,7 @@ static gras_datadesc_type_t parse_typedef(char *definition) gras_datadesc_type_t struct_desc = NULL; gras_datadesc_type_t typedef_desc = NULL; - XBT_IN; + XBT_IN(""); memset(&tm, 0, sizeof(tm)); /* get the aliased type */ @@ -733,7 +733,7 @@ static gras_datadesc_type_t parse_typedef(char *definition) PARSE_ERROR0 ("Unimplemented feature: GRAS_DEFINE_TYPE cannot handle typedef yet"); - XBT_OUT; + XBT_OUT(); return typedef_desc; } @@ -752,7 +752,7 @@ gras_datadesc_parse(const char *name, const char *C_statement) int semicolon_count = 0; int def_count, C_count; - XBT_IN; + XBT_IN(""); /* reput the \n in place for debug */ for (C_count = 0; C_statement[C_count] != '\0'; C_count++) if (C_statement[C_count] == ';' || C_statement[C_count] == '{') @@ -801,7 +801,7 @@ gras_datadesc_parse(const char *name, const char *C_statement) xbt_abort(); } gras_ddt_parse_lex_destroy(); - XBT_OUT; + XBT_OUT(); return res; } diff --git a/src/gras/Transport/rl_transport.c b/src/gras/Transport/rl_transport.c index 3bebb3e3d1..d1db33016b 100644 --- a/src/gras/Transport/rl_transport.c +++ b/src/gras/Transport/rl_transport.c @@ -213,7 +213,7 @@ gras_socket_t gras_trp_select(double timeout) sock_iter->valid = 0; /* don't close it. User may keep references to it */ } else { /* Got a suited socket ! */ - XBT_OUT; + XBT_OUT(); sock_iter->recvd = 1; XBT_DEBUG("Filled little buffer (%c %x %d)", sock_iter->recvd_val, sock_iter->recvd_val, recvd); diff --git a/src/gras/Transport/transport.c b/src/gras/Transport/transport.c index a3c25d5dbc..e8a0213332 100644 --- a/src/gras/Transport/transport.c +++ b/src/gras/Transport/transport.c @@ -170,7 +170,7 @@ void gras_trp_socket_new(int incoming, gras_socket_t * dst) *dst = sock; - XBT_OUT; + XBT_OUT(); } /** @@ -346,7 +346,7 @@ void gras_socket_close(gras_socket_t sock) gras_socket_t sock_iter = NULL; unsigned int cursor; - XBT_IN; + XBT_IN(""); XBT_VERB("Close %p", sock); if (sock == _gras_lastly_selected_socket) { xbt_assert0(!gras_opt_trp_nomoredata_on_close || !sock->moredata, @@ -374,7 +374,7 @@ void gras_socket_close(gras_socket_t sock) /* free the memory */ free(sock); - XBT_OUT; + XBT_OUT(); return; } } @@ -383,7 +383,7 @@ void gras_socket_close(gras_socket_t sock) sock); xbt_backtrace_display_current(); } - XBT_OUT; + XBT_OUT(); } /** @@ -489,7 +489,7 @@ void gras_socket_meas_send(gras_socket_t peer, char *chunk = NULL; unsigned long int sent_sofar; - XBT_IN; + XBT_IN(""); THROW0(unknown_error,0,"measurement sockets were broken in this release of SimGrid and should be ported back in the future." "If you depend on it, sorry, you have to use an older version, or wait for the future version using it..."); if (gras_if_RL()) @@ -515,7 +515,7 @@ void gras_socket_meas_send(gras_socket_t peer, if (gras_if_RL()) free(chunk); - XBT_OUT; + XBT_OUT(); } /** \brief Receive a chunk of data over a measurement socket @@ -537,7 +537,7 @@ void gras_socket_meas_recv(gras_socket_t peer, char *chunk = NULL; unsigned long int got_sofar; - XBT_IN; + XBT_IN(""); THROW0(unknown_error,0,"measurement sockets were broken in this release of SimGrid and should be ported back in the future." "If you depend on it, sorry, you have to use an older version, or wait for the future version using it..."); @@ -562,7 +562,7 @@ void gras_socket_meas_recv(gras_socket_t peer, if (gras_if_RL()) free(chunk); - XBT_OUT; + XBT_OUT(); } /** diff --git a/src/gras/Transport/transport_plugin_sg.c b/src/gras/Transport/transport_plugin_sg.c index 60bd3a0bde..fe83110648 100644 --- a/src/gras/Transport/transport_plugin_sg.c +++ b/src/gras/Transport/transport_plugin_sg.c @@ -251,7 +251,7 @@ void gras_trp_sg_socket_close(gras_socket_t sock) unsigned int cpt; gras_sg_portrec_t pr; - XBT_IN_F(" (sock=%p)", sock); + XBT_IN(" (sock=%p)", sock); if (!sock) return; @@ -266,7 +266,7 @@ void gras_trp_sg_socket_close(gras_socket_t sock) XBT_DEBUG("Check pr %d of %lu", cpt, xbt_dynar_length(hd->ports)); if (pr->port == sockdata->server_port) { xbt_dynar_cursor_rm(hd->ports, &cpt); - XBT_OUT; + XBT_OUT(); return; } } @@ -278,7 +278,7 @@ void gras_trp_sg_socket_close(gras_socket_t sock) /* FIXME: kill the rdv point if receiver side */ free(sock->data); } - XBT_OUT; + XBT_OUT(); } typedef struct { diff --git a/src/gras/Transport/transport_plugin_tcp.c b/src/gras/Transport/transport_plugin_tcp.c index e598ca364c..0835ece385 100644 --- a/src/gras/Transport/transport_plugin_tcp.c +++ b/src/gras/Transport/transport_plugin_tcp.c @@ -223,7 +223,7 @@ static gras_socket_t gras_trp_sock_socket_accept(gras_socket_t sock) uint32_t hisport; - XBT_IN; + XBT_IN(""); gras_trp_socket_new(1, &res); sd = accept(sock->sd, (struct sockaddr *) &peer_in, &peer_in_len); @@ -286,7 +286,7 @@ static gras_socket_t gras_trp_sock_socket_accept(gras_socket_t sock) xbt_dynar_push(((gras_trp_procdata_t) gras_libdata_by_id(gras_trp_libdata_id))->sockets, &res); - XBT_OUT; + XBT_OUT(); return res; } @@ -418,7 +418,7 @@ static void gras_trp_bufiov_flush(gras_socket_t sock) int size; #endif gras_trp_bufdata_t *data = sock->bufdata; - XBT_IN; + XBT_IN(""); XBT_DEBUG("Flush"); if (data->out == buffering_buf) { @@ -466,7 +466,7 @@ gras_trp_buf_send(gras_socket_t sock, gras_trp_bufdata_t *data = (gras_trp_bufdata_t *) sock->bufdata; int chunk_pos = 0; - XBT_IN; + XBT_IN(""); while (chunk_pos < size) { /* size of the chunk to receive in that shot */ @@ -490,7 +490,7 @@ gras_trp_buf_send(gras_socket_t sock, gras_trp_bufiov_flush(sock); } - XBT_OUT; + XBT_OUT(); } static int @@ -500,7 +500,7 @@ gras_trp_buf_recv(gras_socket_t sock, char *chunk, unsigned long int size) gras_trp_bufdata_t *data = sock->bufdata; long int chunk_pos = 0; - XBT_IN; + XBT_IN(""); while (chunk_pos < size) { /* size of the chunk to receive in that shot */ @@ -536,7 +536,7 @@ gras_trp_buf_recv(gras_socket_t sock, char *chunk, unsigned long int size) sock->moredata = (data->in_buf.size > data->in_buf.pos); XBT_DEBUG("There is %smore data", (sock->moredata ? "" : "no ")); - XBT_OUT; + XBT_OUT(); return chunk_pos; } diff --git a/src/surf/cpu.c b/src/surf/cpu.c index 8f06026c71..2847023a4b 100644 --- a/src/surf/cpu.c +++ b/src/surf/cpu.c @@ -294,7 +294,7 @@ static surf_action_t cpu_execute(void *cpu, double size) surf_action_cpu_Cas01_t action = NULL; cpu_Cas01_t CPU = cpu; - XBT_IN_F("(%s,%g)", surf_resource_name(CPU), size); + XBT_IN("(%s,%g)", surf_resource_name(CPU), size); action = surf_action_new(sizeof(s_surf_action_cpu_Cas01_t), size, surf_cpu_model, @@ -307,7 +307,7 @@ static surf_action_t cpu_execute(void *cpu, double size) action->generic_action.priority, CPU->power_scale * CPU->power_peak, 1); lmm_expand(cpu_maxmin_system, CPU->constraint, action->variable, 1.0); - XBT_OUT; + XBT_OUT(); return (surf_action_t) action; } @@ -318,7 +318,7 @@ static surf_action_t cpu_action_sleep(void *cpu, double duration) if (duration > 0) duration = MAX(duration, MAXMIN_PRECISION); - XBT_IN_F("(%s,%g)", surf_resource_name(cpu), duration); + XBT_IN("(%s,%g)", surf_resource_name(cpu), duration); action = (surf_action_cpu_Cas01_t) cpu_execute(cpu, 1.0); action->generic_action.max_duration = duration; action->suspended = 2; @@ -332,32 +332,32 @@ static surf_action_t cpu_action_sleep(void *cpu, double duration) } lmm_update_variable_weight(cpu_maxmin_system, action->variable, 0.0); - XBT_OUT; + XBT_OUT(); return (surf_action_t) action; } static void cpu_action_suspend(surf_action_t action) { - XBT_IN_F("(%p)", action); + XBT_IN("(%p)", action); if (((surf_action_cpu_Cas01_t) action)->suspended != 2) { lmm_update_variable_weight(cpu_maxmin_system, ((surf_action_cpu_Cas01_t) action)->variable, 0.0); ((surf_action_cpu_Cas01_t) action)->suspended = 1; } - XBT_OUT; + XBT_OUT(); } static void cpu_action_resume(surf_action_t action) { - XBT_IN_F("(%p)", action); + XBT_IN("(%p)", action); if (((surf_action_cpu_Cas01_t) action)->suspended != 2) { lmm_update_variable_weight(cpu_maxmin_system, ((surf_action_cpu_Cas01_t) action)->variable, action->priority); ((surf_action_cpu_Cas01_t) action)->suspended = 0; } - XBT_OUT; + XBT_OUT(); } static int cpu_action_is_suspended(surf_action_t action) @@ -368,36 +368,36 @@ static int cpu_action_is_suspended(surf_action_t action) static void cpu_action_set_max_duration(surf_action_t action, double duration) { - XBT_IN_F("(%p,%g)", action, duration); + XBT_IN("(%p,%g)", action, duration); action->max_duration = duration; - XBT_OUT; + XBT_OUT(); } static void cpu_action_set_priority(surf_action_t action, double priority) { - XBT_IN_F("(%p,%g)", action, priority); + XBT_IN("(%p,%g)", action, priority); action->priority = priority; lmm_update_variable_weight(cpu_maxmin_system, ((surf_action_cpu_Cas01_t) action)->variable, priority); - XBT_OUT; + XBT_OUT(); } #ifdef HAVE_TRACING static void cpu_action_set_category(surf_action_t action, const char *category) { - XBT_IN_F("(%p,%s)", action, category); + XBT_IN("(%p,%s)", action, category); action->category = xbt_strdup (category); - XBT_OUT; + XBT_OUT(); } #endif static double cpu_action_get_remains(surf_action_t action) { - XBT_IN_F("(%p)", action); + XBT_IN("(%p)", action); return action->remains; - XBT_OUT; + XBT_OUT(); } static e_surf_resource_state_t cpu_get_state(void *cpu) diff --git a/src/surf/cpu_im.c b/src/surf/cpu_im.c index 35fb87bff2..f4f3873fff 100644 --- a/src/surf/cpu_im.c +++ b/src/surf/cpu_im.c @@ -428,7 +428,7 @@ static surf_action_t cpu_im_execute(void *cpu, double size) surf_action_cpu_Cas01_im_t action = NULL; cpu_Cas01_im_t CPU = cpu; - XBT_IN_F("(%s,%g)", surf_resource_name(CPU), size); + XBT_IN("(%s,%g)", surf_resource_name(CPU), size); action = surf_action_new(sizeof(s_surf_action_cpu_Cas01_im_t), size, surf_cpu_model, @@ -446,7 +446,7 @@ static surf_action_t cpu_im_execute(void *cpu, double size) xbt_swag_insert(action, CPU->action_set); lmm_expand(cpu_im_maxmin_system, CPU->constraint, GENERIC_LMM_ACTION(action).variable, 1.0); - XBT_OUT; + XBT_OUT(); return (surf_action_t) action; } @@ -457,7 +457,7 @@ static surf_action_t cpu_im_action_sleep(void *cpu, double duration) if (duration > 0) duration = MAX(duration, MAXMIN_PRECISION); - XBT_IN_F("(%s,%g)", surf_resource_name(cpu), duration); + XBT_IN("(%s,%g)", surf_resource_name(cpu), duration); action = (surf_action_cpu_Cas01_im_t) cpu_im_execute(cpu, 1.0); GENERIC_ACTION(action).max_duration = duration; GENERIC_LMM_ACTION(action).suspended = 2; @@ -473,13 +473,13 @@ static surf_action_t cpu_im_action_sleep(void *cpu, double duration) lmm_update_variable_weight(cpu_im_maxmin_system, GENERIC_LMM_ACTION(action).variable, 0.0); xbt_swag_insert(cpu, cpu_im_modified_cpu); - XBT_OUT; + XBT_OUT(); return (surf_action_t) action; } static void cpu_im_action_suspend(surf_action_t action) { - XBT_IN_F("(%p)", action); + XBT_IN("(%p)", action); if (((surf_action_lmm_t) action)->suspended != 2) { lmm_update_variable_weight(cpu_im_maxmin_system, ((surf_action_lmm_t) action)->variable, @@ -489,13 +489,13 @@ static void cpu_im_action_suspend(surf_action_t action) ((surf_action_cpu_Cas01_im_t) action)->index_heap); xbt_swag_insert(ACTION_GET_CPU(action), cpu_im_modified_cpu); } - XBT_OUT; + XBT_OUT(); } static void cpu_im_action_resume(surf_action_t action) { - XBT_IN_F("(%p)", action); + XBT_IN("(%p)", action); if (((surf_action_lmm_t) action)->suspended != 2) { lmm_update_variable_weight(cpu_im_maxmin_system, ((surf_action_lmm_t) action)->variable, @@ -503,7 +503,7 @@ static void cpu_im_action_resume(surf_action_t action) ((surf_action_lmm_t) action)->suspended = 0; xbt_swag_insert(ACTION_GET_CPU(action), cpu_im_modified_cpu); } - XBT_OUT; + XBT_OUT(); } static int cpu_im_action_is_suspended(surf_action_t action) @@ -514,44 +514,44 @@ static int cpu_im_action_is_suspended(surf_action_t action) static void cpu_im_action_set_max_duration(surf_action_t action, double duration) { - XBT_IN_F("(%p,%g)", action, duration); + XBT_IN("(%p,%g)", action, duration); action->max_duration = duration; /* insert cpu in modified_cpu set to notice the max duration change */ xbt_swag_insert(ACTION_GET_CPU(action), cpu_im_modified_cpu); - XBT_OUT; + XBT_OUT(); } static void cpu_im_action_set_priority(surf_action_t action, double priority) { - XBT_IN_F("(%p,%g)", action, priority); + XBT_IN("(%p,%g)", action, priority); action->priority = priority; lmm_update_variable_weight(cpu_im_maxmin_system, ((surf_action_lmm_t) action)->variable, priority); xbt_swag_insert(ACTION_GET_CPU(action), cpu_im_modified_cpu); - XBT_OUT; + XBT_OUT(); } #ifdef HAVE_TRACING static void cpu_im_action_set_category(surf_action_t action, const char *category) { - XBT_IN_F("(%p,%s)", action, category); + XBT_IN("(%p,%s)", action, category); action->category = xbt_strdup (category); - XBT_OUT; + XBT_OUT(); } #endif static double cpu_im_action_get_remains(surf_action_t action) { - XBT_IN_F("(%p)", action); + XBT_IN("(%p)", action); /* update remains before return it */ cpu_im_update_remains(ACTION_GET_CPU(action), surf_get_clock()); return action->remains; - XBT_OUT; + XBT_OUT(); } static e_surf_resource_state_t cpu_im_get_state(void *cpu) diff --git a/src/surf/cpu_ti.c b/src/surf/cpu_ti.c index 1ad3060837..f9b3b4e086 100644 --- a/src/surf/cpu_ti.c +++ b/src/surf/cpu_ti.c @@ -583,7 +583,7 @@ static surf_action_t cpu_ti_execute(void *cpu, double size) surf_action_cpu_ti_t action = NULL; cpu_ti_t CPU = cpu; - XBT_IN_F("(%s,%g)", surf_resource_name(CPU), size); + XBT_IN("(%s,%g)", surf_resource_name(CPU), size); action = surf_action_new(sizeof(s_surf_action_cpu_ti_t), size, surf_cpu_model, CPU->state_current != SURF_RESOURCE_ON); @@ -597,7 +597,7 @@ static surf_action_t cpu_ti_execute(void *cpu, double size) action->suspended = 0; /* Should be useless because of the calloc but it seems to help valgrind... */ - XBT_OUT; + XBT_OUT(); return (surf_action_t) action; } @@ -613,7 +613,7 @@ static surf_action_t cpu_ti_action_sleep(void *cpu, double duration) if (duration > 0) duration = MAX(duration, MAXMIN_PRECISION); - XBT_IN_F("(%s,%g)", surf_resource_name(cpu), duration); + XBT_IN("(%s,%g)", surf_resource_name(cpu), duration); action = (surf_action_cpu_ti_t) cpu_ti_execute(cpu, 1.0); action->generic_action.max_duration = duration; action->suspended = 2; @@ -625,30 +625,30 @@ static surf_action_t cpu_ti_action_sleep(void *cpu, double duration) cpu_ti_running_action_set_that_does_not_need_being_checked; xbt_swag_insert(action, ((surf_action_t) action)->state_set); } - XBT_OUT; + XBT_OUT(); return (surf_action_t) action; } static void cpu_ti_action_suspend(surf_action_t action) { - XBT_IN_F("(%p)", action); + XBT_IN("(%p)", action); if (((surf_action_cpu_ti_t) action)->suspended != 2) { ((surf_action_cpu_ti_t) action)->suspended = 1; xbt_heap_remove(cpu_ti_action_heap, ((surf_action_cpu_ti_t) action)->index_heap); xbt_swag_insert(ACTION_GET_CPU(action), cpu_ti_modified_cpu); } - XBT_OUT; + XBT_OUT(); } static void cpu_ti_action_resume(surf_action_t action) { - XBT_IN_F("(%p)", action); + XBT_IN("(%p)", action); if (((surf_action_cpu_ti_t) action)->suspended != 2) { ((surf_action_cpu_ti_t) action)->suspended = 0; xbt_swag_insert(ACTION_GET_CPU(action), cpu_ti_modified_cpu); } - XBT_OUT; + XBT_OUT(); } static int cpu_ti_action_is_suspended(surf_action_t action) @@ -662,7 +662,7 @@ static void cpu_ti_action_set_max_duration(surf_action_t action, surf_action_cpu_ti_t ACT = (surf_action_cpu_ti_t) action; double min_finish; - XBT_IN_F("(%p,%g)", action, duration); + XBT_IN("(%p,%g)", action, duration); action->max_duration = duration; @@ -683,26 +683,26 @@ static void cpu_ti_action_set_max_duration(surf_action_t action, } xbt_heap_push(cpu_ti_action_heap, ACT, min_finish); - XBT_OUT; + XBT_OUT(); } static void cpu_ti_action_set_priority(surf_action_t action, double priority) { - XBT_IN_F("(%p,%g)", action, priority); + XBT_IN("(%p,%g)", action, priority); action->priority = priority; xbt_swag_insert(ACTION_GET_CPU(action), cpu_ti_modified_cpu); - XBT_OUT; + XBT_OUT(); } static double cpu_ti_action_get_remains(surf_action_t action) { - XBT_IN_F("(%p)", action); + XBT_IN("(%p)", action); cpu_ti_update_remaining_amount((cpu_ti_t) ((surf_action_cpu_ti_t) action)->cpu, surf_get_clock()); return action->remains; - XBT_OUT; + XBT_OUT(); } static e_surf_resource_state_t cpu_ti_get_state(void *cpu) diff --git a/src/surf/lagrange.c b/src/surf/lagrange.c index ba9821e310..62a255a36a 100644 --- a/src/surf/lagrange.c +++ b/src/surf/lagrange.c @@ -378,7 +378,7 @@ static double dichotomy(double init, double diff(double, void *), double diff_0 = 0.0; min = max = init; - XBT_IN; + XBT_IN(""); if (init == 0.0) { min = max = 0.5; @@ -389,7 +389,7 @@ static double dichotomy(double init, double diff(double, void *), if ((diff_0 = diff(1e-16, var_cnst)) >= 0) { XBT_CDEBUG(surf_lagrange_dichotomy, "returning 0.0 (diff = %e)", diff_0); - XBT_OUT; + XBT_OUT(); return 0.0; } @@ -472,7 +472,7 @@ static double dichotomy(double init, double diff(double, void *), } XBT_CDEBUG(surf_lagrange_dichotomy, "returning %e", (min + max) / 2.0); - XBT_OUT; + XBT_OUT(); return ((min + max) / 2.0); } @@ -487,7 +487,7 @@ static double partial_diff_lambda(double lambda, void *param_cnst) double diff = 0.0; double sigma_i = 0.0; - XBT_IN; + XBT_IN(""); elem_list = &(cnst->element_set); XBT_CDEBUG(surf_lagrange_dichotomy, "Computing diff of cnst (%p)", cnst); @@ -523,7 +523,7 @@ static double partial_diff_lambda(double lambda, void *param_cnst) XBT_CDEBUG(surf_lagrange_dichotomy, "d D/d lambda for cnst (%p) at %1.20f = %1.20f", cnst, lambda, diff); - XBT_OUT; + XBT_OUT(); return diff; } diff --git a/src/surf/maxmin.c b/src/surf/maxmin.c index 0c370f0438..78e34a1156 100644 --- a/src/surf/maxmin.c +++ b/src/surf/maxmin.c @@ -89,7 +89,7 @@ XBT_INLINE void lmm_variable_disable(lmm_system_t sys, lmm_variable_t var) int i; lmm_element_t elem = NULL; - XBT_IN_F("(sys=%p, var=%p)", sys, var); + XBT_IN("(sys=%p, var=%p)", sys, var); sys->modified = 1; for (i = 0; i < var->cnsts_number; i++) { @@ -102,7 +102,7 @@ XBT_INLINE void lmm_variable_disable(lmm_system_t sys, lmm_variable_t var) lmm_update_modified_set(sys, elem->constraint); } var->cnsts_number = 0; - XBT_OUT; + XBT_OUT(); } static void lmm_var_free(lmm_system_t sys, lmm_variable_t var) @@ -185,7 +185,7 @@ lmm_variable_t lmm_variable_new(lmm_system_t sys, void *id, lmm_variable_t var = NULL; int i; - XBT_IN_F("(sys=%p, id=%p, weight=%f, bound=%f, num_cons =%d)", + XBT_IN("(sys=%p, id=%p, weight=%f, bound=%f, num_cons =%d)", sys, id, weight, bound, number_of_constraints); var = xbt_mallocator_get(sys->variable_mallocator); @@ -222,7 +222,7 @@ lmm_variable_t lmm_variable_new(lmm_system_t sys, void *id, xbt_swag_insert_at_head(var, &(sys->variable_set)); else xbt_swag_insert_at_tail(var, &(sys->variable_set)); - XBT_OUT; + XBT_OUT(); return var; } @@ -350,13 +350,13 @@ static XBT_INLINE void saturated_constraint_set_update(lmm_system_t sys, { lmm_constraint_t useless_cnst = NULL; - XBT_IN_F("sys=%p, cnst=%p, min_usage=%f", sys, cnst, *min_usage); + XBT_IN("sys=%p, cnst=%p, min_usage=%f", sys, cnst, *min_usage); if (cnst->usage <= 0) { - XBT_OUT; + XBT_OUT(); return; } if (cnst->remaining <= 0) { - XBT_OUT; + XBT_OUT(); return; } if ((*min_usage < 0) || (*min_usage > cnst->remaining / cnst->usage)) { @@ -372,7 +372,7 @@ static XBT_INLINE void saturated_constraint_set_update(lmm_system_t sys, } else if (*min_usage == cnst->remaining / cnst->usage) { xbt_swag_insert(cnst, &(sys->saturated_constraint_set)); } - XBT_OUT; + XBT_OUT(); } static XBT_INLINE void saturated_variable_set_update(lmm_system_t sys) @@ -505,7 +505,7 @@ void lmm_solve(lmm_system_t sys) if (!(sys->modified)) return; - XBT_IN_F("(sys=%p)", sys); + XBT_IN("(sys=%p)", sys); /* * Compute Usage and store the variables that reach the maximum. @@ -650,7 +650,7 @@ void lmm_solve(lmm_system_t sys) if (XBT_LOG_ISENABLED(surf_maxmin, xbt_log_priority_debug)) { lmm_print(sys); } - XBT_OUT; + XBT_OUT(); } /* Not a O(1) function */ @@ -703,7 +703,7 @@ void lmm_update_variable_weight(lmm_system_t sys, lmm_variable_t var, if (weight == var->weight) return; - XBT_IN_F("(sys=%p, var=%p, weight=%f)", sys, var, weight); + XBT_IN("(sys=%p, var=%p, weight=%f)", sys, var, weight); sys->modified = 1; var->weight = weight; xbt_swag_remove(var, &(sys->variable_set)); @@ -725,7 +725,7 @@ void lmm_update_variable_weight(lmm_system_t sys, lmm_variable_t var, if (!weight) var->value = 0.0; - XBT_OUT; + XBT_OUT(); } XBT_INLINE double lmm_get_variable_weight(lmm_variable_t var) diff --git a/src/surf/network.c b/src/surf/network.c index 3fb305c1a7..7a75d8b507 100644 --- a/src/surf/network.c +++ b/src/surf/network.c @@ -621,7 +621,7 @@ static surf_action_t net_communicate(const char *src_name, /* LARGE PLATFORMS HACK: total_route_size = route_size + src->link_nb + dst->nb */ - XBT_IN_F("(%s,%s,%g,%g)", src_name, dst_name, size, rate); + XBT_IN("(%s,%s,%g,%g)", src_name, dst_name, size, rate); /* LARGE PLATFORMS HACK: assert on total_route_size */ latency = global_routing->get_latency(src_name,dst_name); @@ -741,7 +741,7 @@ static surf_action_t net_communicate(const char *src_name, #endif xbt_dynar_free(&route); - XBT_OUT; + XBT_OUT(); return (surf_action_t) action; } diff --git a/src/surf/network_constant.c b/src/surf/network_constant.c index 6af391d516..066cd014dc 100644 --- a/src/surf/network_constant.c +++ b/src/surf/network_constant.c @@ -117,7 +117,7 @@ static surf_action_t netcste_communicate(const char *src_name, { surf_action_network_Constant_t action = NULL; - XBT_IN_F("(%s,%s,%g,%g)", src_name, dst_name, size, rate); + XBT_IN("(%s,%s,%g,%g)", src_name, dst_name, size, rate); action = surf_action_new(sizeof(s_surf_action_network_Constant_t), size, @@ -134,7 +134,7 @@ static surf_action_t netcste_communicate(const char *src_name, xbt_swag_insert(action, action->generic_action.state_set); } - XBT_OUT; + XBT_OUT(); return (surf_action_t) action; } diff --git a/src/surf/network_gtnets.c b/src/surf/network_gtnets.c index aa467feeb9..804a20ab28 100644 --- a/src/surf/network_gtnets.c +++ b/src/surf/network_gtnets.c @@ -58,7 +58,7 @@ static void route_new(int src_id, int dst_id, xbt_dynar_t links, int i = 0; int *gtnets_links; - XBT_IN_F("(src_id=%d, dst_id=%d, links=%p, nb_link=%d)", + XBT_IN("(src_id=%d, dst_id=%d, links=%p, nb_link=%d)", src_id, dst_id, links, nb_link); /* Build the list of gtnets link IDs */ @@ -71,7 +71,7 @@ static void route_new(int src_id, int dst_id, xbt_dynar_t links, if (gtnets_add_route(src_id, dst_id, gtnets_links, nb_link)) { xbt_assert0(0, "Cannot create GTNetS route"); } - XBT_OUT; + XBT_OUT(); } static void route_onehop_new(int src_id, int dst_id, diff --git a/src/surf/network_im.c b/src/surf/network_im.c index 08b26a6e9a..86e53b4e91 100644 --- a/src/surf/network_im.c +++ b/src/surf/network_im.c @@ -668,7 +668,7 @@ static surf_action_t im_net_communicate(const char *src_name, /* LARGE PLATFORMS HACK: total_route_size = route_size + src->link_nb + dst->nb */ - XBT_IN_F("(%s,%s,%g,%g)", src_name, dst_name, size, rate); + XBT_IN("(%s,%s,%g,%g)", src_name, dst_name, size, rate); /* LARGE PLATFORMS HACK: assert on total_route_size */ xbt_assert2(xbt_dynar_length(route), @@ -791,7 +791,7 @@ static surf_action_t im_net_communicate(const char *src_name, #endif xbt_dynar_free(&route); - XBT_OUT; + XBT_OUT(); return (surf_action_t) action; } diff --git a/src/surf/surf_action.c b/src/surf/surf_action.c index 95fe801079..3b2b0fa2d7 100644 --- a/src/surf/surf_action.c +++ b/src/surf/surf_action.c @@ -129,7 +129,7 @@ void surf_action_state_set(surf_action_t action, e_surf_action_state_t state) { surf_action_state_t action_state = &(action->model_type->states); - XBT_IN_F("(%p,%s)", action, surf_action_state_names[state]); + XBT_IN("(%p,%s)", action, surf_action_state_names[state]); xbt_swag_remove(action, action->state_set); if (state == SURF_ACTION_READY) @@ -145,7 +145,7 @@ void surf_action_state_set(surf_action_t action, if (action->state_set) xbt_swag_insert(action, action->state_set); - XBT_OUT; + XBT_OUT(); } void surf_action_data_set(surf_action_t action, void *data) diff --git a/src/surf/workstation_ptask_L07.c b/src/surf/workstation_ptask_L07.c index de1fa513c7..f5544c007a 100644 --- a/src/surf/workstation_ptask_L07.c +++ b/src/surf/workstation_ptask_L07.c @@ -145,14 +145,14 @@ static void ptask_action_cancel(surf_action_t action) static void ptask_action_suspend(surf_action_t action) { - XBT_IN_F("(%p))", action); + XBT_IN("(%p))", action); if (((surf_action_workstation_L07_t) action)->suspended != 2) { ((surf_action_workstation_L07_t) action)->suspended = 1; lmm_update_variable_weight(ptask_maxmin_system, ((surf_action_workstation_L07_t) action)->variable, 0.0); } - XBT_OUT; + XBT_OUT(); } static void ptask_action_resume(surf_action_t action) @@ -160,12 +160,12 @@ static void ptask_action_resume(surf_action_t action) surf_action_workstation_L07_t act = (surf_action_workstation_L07_t) action; - XBT_IN_F("(%p)", act); + XBT_IN("(%p)", act); if (act->suspended != 2) { lmm_update_variable_weight(ptask_maxmin_system, act->variable, 1.0); act->suspended = 0; } - XBT_OUT; + XBT_OUT(); } static int ptask_action_is_suspended(surf_action_t action) @@ -176,25 +176,25 @@ static int ptask_action_is_suspended(surf_action_t action) static void ptask_action_set_max_duration(surf_action_t action, double duration) { /* FIXME: should inherit */ - XBT_IN_F("(%p,%g)", action, duration); + XBT_IN("(%p,%g)", action, duration); action->max_duration = duration; - XBT_OUT; + XBT_OUT(); } static void ptask_action_set_priority(surf_action_t action, double priority) { /* FIXME: should inherit */ - XBT_IN_F("(%p,%g)", action, priority); + XBT_IN("(%p,%g)", action, priority); action->priority = priority; - XBT_OUT; + XBT_OUT(); } static double ptask_action_get_remains(surf_action_t action) { - XBT_IN_F("(%p)", action); + XBT_IN("(%p)", action); return action->remains; - XBT_OUT; + XBT_OUT(); } /**************************************/ @@ -578,14 +578,14 @@ static surf_action_t ptask_action_sleep(void *cpu, double duration) { surf_action_workstation_L07_t action = NULL; - XBT_IN_F("(%s,%g)", surf_resource_name(cpu), duration); + XBT_IN("(%s,%g)", surf_resource_name(cpu), duration); action = (surf_action_workstation_L07_t) ptask_execute(cpu, 1.0); action->generic_action.max_duration = duration; action->suspended = 2; lmm_update_variable_weight(ptask_maxmin_system, action->variable, 0.0); - XBT_OUT; + XBT_OUT(); return (surf_action_t) action; } diff --git a/src/xbt/config.c b/src/xbt/config.c index 2b18cc8638..e1b21e3e24 100644 --- a/src/xbt/config.c +++ b/src/xbt/config.c @@ -594,7 +594,7 @@ void xbt_cfg_set_parse(xbt_cfg_t cfg, const char *options) int len; - XBT_IN; + XBT_IN(""); if (!options || !strlen(options)) { /* nothing to do */ return; } diff --git a/src/xbt/log.c b/src/xbt/log.c index e689f19482..dab6fd5084 100644 --- a/src/xbt/log.c +++ b/src/xbt/log.c @@ -240,8 +240,7 @@ producing macro (ie, use #XBT_CDEBUG, #XBT_CVERB, #XBT_CINFO, #XBT_CWARN, first argument. The TRACE priority is not used the same way than the other. You should use -the #XBT_IN, #XBT_IN_F, #XBT_OUT and #XBT_HERE macros -instead. +the #XBT_IN, #XBT_OUT and #XBT_HERE macros instead. \section log_API_example 2.6 Example of use -- 2.20.1