git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9655
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
20 files changed:
*/
#define XBT_CRITICAL(...) XBT_LOG(xbt_log_priority_critical, __VA_ARGS__)
*/
#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.
*/
/** @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__)
XBT_LOG(xbt_log_priority_trace, ">> begin of %s" fmt "%s", \
_XBT_FUNCTION, __VA_ARGS__)
* @hideinitializer
* @brief Log at TRACE priority that we exited the current function.
*/
* @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.
*/
/** @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_ */
SG_END_DECL()
#endif /* ! _XBT_LOG_H_ */
{
gras_datadesc_type_t res;
{
gras_datadesc_type_t res;
- XBT_IN_F("(%s)", name);
res = xbt_new0(s_gras_datadesc_type_t, 1);
res->name = (char *) strdup(name);
res = xbt_new0(s_gras_datadesc_type_t, 1);
res->name = (char *) strdup(name);
xbt_set_add(gras_datadesc_set_local, (xbt_set_elm_t) res,
gras_ddt_freev);
xbt_set_add(gras_datadesc_set_local, (xbt_set_elm_t) res,
gras_ddt_freev);
gras_datadesc_type_t res;
long int arch;
gras_datadesc_type_t res;
long int arch;
res = gras_datadesc_by_name_or_null(name);
if (res) {
xbt_assert1(res->category_code == e_gras_datadesc_type_cat_scalar,
res = gras_datadesc_by_name_or_null(name);
if (res) {
xbt_assert1(res->category_code == e_gras_datadesc_type_cat_scalar,
res->category_code = e_gras_datadesc_type_cat_scalar;
res->category.scalar_data.encoding = encoding;
res->category.scalar_data.type = type;
res->category_code = e_gras_datadesc_type_cat_scalar;
res->category.scalar_data.encoding = encoding;
res->category.scalar_data.type = type;
void gras_dd_cat_field_free(void *f)
{
gras_dd_cat_field_t field = *(gras_dd_cat_field_t *) f;
void gras_dd_cat_field_free(void *f)
{
gras_dd_cat_field_t field = *(gras_dd_cat_field_t *) f;
if (field) {
if (field->name)
free(field->name);
free(field);
}
if (field) {
if (field->name)
free(field->name);
free(field);
}
}
/** \brief Declare a new structure description */
}
/** \brief Declare a new structure description */
gras_datadesc_type_t res;
long int arch;
gras_datadesc_type_t res;
long int arch;
- XBT_IN_F("(%s)", name);
res = gras_datadesc_by_name_or_null(name);
if (res) {
/* FIXME: Check that field redefinition matches */
res = gras_datadesc_by_name_or_null(name);
if (res) {
/* FIXME: Check that field redefinition matches */
res->category.struct_data.fields =
xbt_dynar_new(sizeof(gras_dd_cat_field_t), gras_dd_cat_field_free);
res->category.struct_data.fields =
xbt_dynar_new(sizeof(gras_dd_cat_field_t), gras_dd_cat_field_free);
xbt_assert2(field_type,
"Cannot add the field '%s' into struct '%s': its type is NULL",
name, struct_type->name);
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?)",
if (struct_type->category.struct_data.closed) {
XBT_DEBUG
("Ignoring request to add field to struct %s (closed. Redefinition?)",
struct_type->size[GRAS_THISARCH],
struct_type->alignment[GRAS_THISARCH],
struct_type->aligned_size[GRAS_THISARCH]);
struct_type->size[GRAS_THISARCH],
struct_type->alignment[GRAS_THISARCH],
struct_type->aligned_size[GRAS_THISARCH]);
}
/** \brief Close a structure description
}
/** \brief Close a structure description
void gras_datadesc_struct_close(gras_datadesc_type_t struct_type)
{
int arch;
void gras_datadesc_struct_close(gras_datadesc_type_t struct_type)
{
int arch;
struct_type->category.struct_data.closed = 1;
for (arch = 0; arch < gras_arch_count; arch++) {
struct_type->size[arch] = struct_type->aligned_size[arch];
struct_type->category.struct_data.closed = 1;
for (arch = 0; arch < gras_arch_count; arch++) {
struct_type->size[arch] = struct_type->aligned_size[arch];
gras_datadesc_type_t res;
int arch;
gras_datadesc_type_t res;
int arch;
- XBT_IN_F("(%s)", name);
xbt_assert0(selector,
"Attempt to creat an union without field_count function");
xbt_assert0(selector,
"Attempt to creat an union without field_count function");
gras_dd_cat_field_t field;
int arch;
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);
xbt_assert1(field_type->size[GRAS_THISARCH] >= 0,
"Cannot add a dynamically sized field in union %s",
union_type->name);
gras_datadesc_by_name("data pointer");
int arch;
gras_datadesc_by_name("data pointer");
int arch;
- XBT_IN_F("(%s)", name);
res = gras_datadesc_by_name_or_null(name);
if (res) {
xbt_assert1(res->category_code == e_gras_datadesc_type_cat_ref,
res = gras_datadesc_by_name_or_null(name);
if (res) {
xbt_assert1(res->category_code == e_gras_datadesc_type_cat_ref,
gras_datadesc_by_name("data pointer");
int arch;
gras_datadesc_by_name("data pointer");
int arch;
- XBT_IN_F("(%s)", name);
res = gras_datadesc_by_name_or_null(name);
if (res) {
res = gras_datadesc_by_name_or_null(name);
if (res) {
gras_datadesc_type_t res;
int arch;
gras_datadesc_type_t res;
int arch;
- XBT_IN_F("(%s)", name);
res = gras_datadesc_by_name_or_null(name);
if (res) {
xbt_assert1(res->category_code == e_gras_datadesc_type_cat_array,
res = gras_datadesc_by_name_or_null(name);
if (res) {
xbt_assert1(res->category_code == e_gras_datadesc_type_cat_array,
gras_datadesc_type_t res;
int arch;
gras_datadesc_type_t res;
int arch;
- XBT_IN_F("(%s)", name);
xbt_assert1(dynamic_size,
"'%s' is a dynamic array without size discriminant", name);
xbt_assert1(dynamic_size,
"'%s' is a dynamic array without size discriminant", name);
/* local functions */
static void parse_type_modifier(type_modifier_t type_modifier)
{
/* local functions */
static void parse_type_modifier(type_modifier_t type_modifier)
{
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 */
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 */
}
static void print_type_modifier(s_type_modifier_t tm)
{
int i;
}
static void print_type_modifier(s_type_modifier_t tm)
{
int i;
if (tm.is_unsigned)
printf("(unsigned) ");
if (tm.is_short)
if (tm.is_unsigned)
printf("(unsigned) ");
if (tm.is_short)
for (i = 0; i < tm.is_ref; i++)
printf("(ref) ");
for (i = 0; i < tm.is_ref; i++)
printf("(ref) ");
}
static void change_to_fixed_array(xbt_dynar_t dynar, long int size)
}
static void change_to_fixed_array(xbt_dynar_t dynar, long int size)
s_identifier_t former, array;
memset(&array, 0, sizeof(array));
s_identifier_t former, array;
memset(&array, 0, sizeof(array));
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",
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",
array.name = former.name;
xbt_dynar_push(dynar, &array);
array.name = former.name;
xbt_dynar_push(dynar, &array);
}
static void change_to_ref(xbt_dynar_t dynar)
}
static void change_to_ref(xbt_dynar_t dynar)
s_identifier_t former, ref;
memset(&ref, 0, sizeof(ref));
s_identifier_t former, ref;
memset(&ref, 0, sizeof(ref));
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",
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",
ref.name = former.name;
xbt_dynar_push(dynar, &ref);
ref.name = former.name;
xbt_dynar_push(dynar, &ref);
}
static void change_to_ref_pop_array(xbt_dynar_t dynar)
}
static void change_to_ref_pop_array(xbt_dynar_t dynar)
s_identifier_t former, ref;
memset(&ref, 0, sizeof(ref));
s_identifier_t former, ref;
memset(&ref, 0, sizeof(ref));
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);
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);
free(former.type_name);
xbt_dynar_push(dynar, &ref);
free(former.type_name);
xbt_dynar_push(dynar, &ref);
}
static void change_to_dynar_of(xbt_dynar_t dynar,
}
static void change_to_dynar_of(xbt_dynar_t dynar,
s_identifier_t former, ref;
memset(&ref, 0, sizeof(ref));
s_identifier_t former, ref;
memset(&ref, 0, sizeof(ref));
xbt_dynar_pop(dynar, &former);
ref.type = gras_datadesc_dynar(subtype, NULL); /* redeclaration are ignored */
ref.type_name = (char *) strdup(ref.type->name);
xbt_dynar_pop(dynar, &former);
ref.type = gras_datadesc_dynar(subtype, NULL); /* redeclaration are ignored */
ref.type_name = (char *) strdup(ref.type->name);
free(former.type_name);
xbt_dynar_push(dynar, &ref);
free(former.type_name);
xbt_dynar_push(dynar, &ref);
}
static void change_to_matrix_of(xbt_dynar_t dynar,
}
static void change_to_matrix_of(xbt_dynar_t dynar,
s_identifier_t former, ref;
memset(&ref, 0, sizeof(ref));
s_identifier_t former, ref;
memset(&ref, 0, sizeof(ref));
xbt_dynar_pop(dynar, &former);
ref.type = gras_datadesc_matrix(subtype, NULL); /* redeclaration are ignored */
ref.type_name = (char *) strdup(ref.type->name);
xbt_dynar_pop(dynar, &former);
ref.type = gras_datadesc_matrix(subtype, NULL); /* redeclaration are ignored */
ref.type_name = (char *) strdup(ref.type->name);
free(former.type_name);
xbt_dynar_push(dynar, &ref);
free(former.type_name);
xbt_dynar_push(dynar, &ref);
}
static void add_free_f(xbt_dynar_t dynar, void_f_pvoid_t free_f)
}
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));
s_identifier_t former, ref;
memset(&ref, 0, sizeof(ref));
xbt_dynar_pop(dynar, &former);
memcpy(former.type->extra, free_f, sizeof(free_f));
xbt_dynar_push(dynar, &former);
xbt_dynar_pop(dynar, &former);
memcpy(former.type->extra, free_f, sizeof(free_f));
xbt_dynar_push(dynar, &former);
}
static void parse_statement(char *definition,
}
static void parse_statement(char *definition,
int expect_id_separator = 0;
int expect_id_separator = 0;
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) {
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) {
THROW0(mismatch_error, 0, "End of the englobing structure or union");
}
THROW0(mismatch_error, 0, "End of the englobing structure or union");
}
if (identifier.tm.is_dynar > 0)
PARSE_ERROR0("xbt_dynar_t field without 'subtype' annotation");
if (identifier.tm.is_dynar > 0)
PARSE_ERROR0("xbt_dynar_t field without 'subtype' annotation");
}
static gras_datadesc_type_t parse_struct(char *definition)
}
static gras_datadesc_type_t parse_struct(char *definition)
gras_datadesc_type_t struct_type;
gras_datadesc_type_t struct_type;
identifiers = xbt_dynar_new(sizeof(s_identifier_t), NULL);
fields_to_push = xbt_dynar_new(sizeof(char *), NULL);
identifiers = xbt_dynar_new(sizeof(s_identifier_t), NULL);
fields_to_push = xbt_dynar_new(sizeof(char *), NULL);
xbt_dynar_free(&identifiers);
xbt_dynar_free(&fields_to_push);
xbt_dynar_free(&identifiers);
xbt_dynar_free(&fields_to_push);
gras_datadesc_type_t struct_desc = NULL;
gras_datadesc_type_t typedef_desc = NULL;
gras_datadesc_type_t struct_desc = NULL;
gras_datadesc_type_t typedef_desc = NULL;
memset(&tm, 0, sizeof(tm));
/* get the aliased type */
memset(&tm, 0, sizeof(tm));
/* get the aliased type */
PARSE_ERROR0
("Unimplemented feature: GRAS_DEFINE_TYPE cannot handle typedef yet");
PARSE_ERROR0
("Unimplemented feature: GRAS_DEFINE_TYPE cannot handle typedef yet");
int semicolon_count = 0;
int def_count, C_count;
int semicolon_count = 0;
int def_count, C_count;
/* 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] == '{')
/* 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] == '{')
xbt_abort();
}
gras_ddt_parse_lex_destroy();
xbt_abort();
}
gras_ddt_parse_lex_destroy();
sock_iter->valid = 0; /* don't close it. User may keep references to it */
} else {
/* Got a suited socket ! */
sock_iter->valid = 0; /* don't close it. User may keep references to it */
} else {
/* Got a suited socket ! */
sock_iter->recvd = 1;
XBT_DEBUG("Filled little buffer (%c %x %d)", sock_iter->recvd_val,
sock_iter->recvd_val, recvd);
sock_iter->recvd = 1;
XBT_DEBUG("Filled little buffer (%c %x %d)", sock_iter->recvd_val,
sock_iter->recvd_val, recvd);
gras_socket_t sock_iter = NULL;
unsigned int cursor;
gras_socket_t sock_iter = NULL;
unsigned int cursor;
XBT_VERB("Close %p", sock);
if (sock == _gras_lastly_selected_socket) {
xbt_assert0(!gras_opt_trp_nomoredata_on_close || !sock->moredata,
XBT_VERB("Close %p", sock);
if (sock == _gras_lastly_selected_socket) {
xbt_assert0(!gras_opt_trp_nomoredata_on_close || !sock->moredata,
/* free the memory */
free(sock);
/* free the memory */
free(sock);
sock);
xbt_backtrace_display_current();
}
sock);
xbt_backtrace_display_current();
}
char *chunk = NULL;
unsigned long int sent_sofar;
char *chunk = NULL;
unsigned long int sent_sofar;
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())
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())
if (gras_if_RL())
free(chunk);
if (gras_if_RL())
free(chunk);
}
/** \brief Receive a chunk of data over a measurement socket
}
/** \brief Receive a chunk of data over a measurement socket
char *chunk = NULL;
unsigned long int got_sofar;
char *chunk = NULL;
unsigned long int got_sofar;
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...");
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())
free(chunk);
if (gras_if_RL())
free(chunk);
unsigned int cpt;
gras_sg_portrec_t pr;
unsigned int cpt;
gras_sg_portrec_t pr;
- XBT_IN_F(" (sock=%p)", sock);
+ XBT_IN(" (sock=%p)", 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_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);
/* FIXME: kill the rdv point if receiver side */
free(sock->data);
}
/* FIXME: kill the rdv point if receiver side */
free(sock->data);
}
gras_trp_socket_new(1, &res);
sd = accept(sock->sd, (struct sockaddr *) &peer_in, &peer_in_len);
gras_trp_socket_new(1, &res);
sd = accept(sock->sd, (struct sockaddr *) &peer_in, &peer_in_len);
xbt_dynar_push(((gras_trp_procdata_t)
gras_libdata_by_id(gras_trp_libdata_id))->sockets, &res);
xbt_dynar_push(((gras_trp_procdata_t)
gras_libdata_by_id(gras_trp_libdata_id))->sockets, &res);
int size;
#endif
gras_trp_bufdata_t *data = sock->bufdata;
int size;
#endif
gras_trp_bufdata_t *data = sock->bufdata;
XBT_DEBUG("Flush");
if (data->out == buffering_buf) {
XBT_DEBUG("Flush");
if (data->out == buffering_buf) {
gras_trp_bufdata_t *data = (gras_trp_bufdata_t *) sock->bufdata;
int chunk_pos = 0;
gras_trp_bufdata_t *data = (gras_trp_bufdata_t *) sock->bufdata;
int chunk_pos = 0;
while (chunk_pos < size) {
/* size of the chunk to receive in that shot */
while (chunk_pos < size) {
/* size of the chunk to receive in that shot */
gras_trp_bufiov_flush(sock);
}
gras_trp_bufiov_flush(sock);
}
gras_trp_bufdata_t *data = sock->bufdata;
long int chunk_pos = 0;
gras_trp_bufdata_t *data = sock->bufdata;
long int chunk_pos = 0;
while (chunk_pos < size) {
/* size of the chunk to receive in that shot */
while (chunk_pos < size) {
/* size of the chunk to receive in that shot */
sock->moredata = (data->in_buf.size > data->in_buf.pos);
XBT_DEBUG("There is %smore data", (sock->moredata ? "" : "no "));
sock->moredata = (data->in_buf.size > data->in_buf.pos);
XBT_DEBUG("There is %smore data", (sock->moredata ? "" : "no "));
surf_action_cpu_Cas01_t action = NULL;
cpu_Cas01_t CPU = cpu;
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,
action =
surf_action_new(sizeof(s_surf_action_cpu_Cas01_t), size,
surf_cpu_model,
action->generic_action.priority,
CPU->power_scale * CPU->power_peak, 1);
lmm_expand(cpu_maxmin_system, CPU->constraint, action->variable, 1.0);
action->generic_action.priority,
CPU->power_scale * CPU->power_peak, 1);
lmm_expand(cpu_maxmin_system, CPU->constraint, action->variable, 1.0);
return (surf_action_t) action;
}
return (surf_action_t) action;
}
if (duration > 0)
duration = MAX(duration, MAXMIN_PRECISION);
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;
action = (surf_action_cpu_Cas01_t) cpu_execute(cpu, 1.0);
action->generic_action.max_duration = duration;
action->suspended = 2;
}
lmm_update_variable_weight(cpu_maxmin_system, action->variable, 0.0);
}
lmm_update_variable_weight(cpu_maxmin_system, action->variable, 0.0);
return (surf_action_t) action;
}
static void cpu_action_suspend(surf_action_t action)
{
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;
}
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;
}
}
static void cpu_action_resume(surf_action_t action)
{
}
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;
}
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;
}
}
static int cpu_action_is_suspended(surf_action_t action)
}
static int cpu_action_is_suspended(surf_action_t action)
static void cpu_action_set_max_duration(surf_action_t action,
double duration)
{
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;
action->max_duration = duration;
}
static void cpu_action_set_priority(surf_action_t action, double priority)
{
}
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);
action->priority = priority;
lmm_update_variable_weight(cpu_maxmin_system,
((surf_action_cpu_Cas01_t) action)->variable,
priority);
}
#ifdef HAVE_TRACING
static void cpu_action_set_category(surf_action_t action, const char *category)
{
}
#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);
action->category = xbt_strdup (category);
}
#endif
static double cpu_action_get_remains(surf_action_t action)
{
}
#endif
static double cpu_action_get_remains(surf_action_t action)
{
- XBT_IN_F("(%p)", action);
+ XBT_IN("(%p)", action);
}
static e_surf_resource_state_t cpu_get_state(void *cpu)
}
static e_surf_resource_state_t cpu_get_state(void *cpu)
surf_action_cpu_Cas01_im_t action = NULL;
cpu_Cas01_im_t CPU = cpu;
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,
action =
surf_action_new(sizeof(s_surf_action_cpu_Cas01_im_t), size,
surf_cpu_model,
xbt_swag_insert(action, CPU->action_set);
lmm_expand(cpu_im_maxmin_system, CPU->constraint,
GENERIC_LMM_ACTION(action).variable, 1.0);
xbt_swag_insert(action, CPU->action_set);
lmm_expand(cpu_im_maxmin_system, CPU->constraint,
GENERIC_LMM_ACTION(action).variable, 1.0);
return (surf_action_t) action;
}
return (surf_action_t) action;
}
if (duration > 0)
duration = MAX(duration, MAXMIN_PRECISION);
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;
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;
lmm_update_variable_weight(cpu_im_maxmin_system,
GENERIC_LMM_ACTION(action).variable, 0.0);
xbt_swag_insert(cpu, cpu_im_modified_cpu);
lmm_update_variable_weight(cpu_im_maxmin_system,
GENERIC_LMM_ACTION(action).variable, 0.0);
xbt_swag_insert(cpu, cpu_im_modified_cpu);
return (surf_action_t) action;
}
static void cpu_im_action_suspend(surf_action_t action)
{
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,
if (((surf_action_lmm_t) action)->suspended != 2) {
lmm_update_variable_weight(cpu_im_maxmin_system,
((surf_action_lmm_t) action)->variable,
((surf_action_cpu_Cas01_im_t) action)->index_heap);
xbt_swag_insert(ACTION_GET_CPU(action), cpu_im_modified_cpu);
}
((surf_action_cpu_Cas01_im_t) action)->index_heap);
xbt_swag_insert(ACTION_GET_CPU(action), cpu_im_modified_cpu);
}
}
static void cpu_im_action_resume(surf_action_t action)
{
}
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,
if (((surf_action_lmm_t) action)->suspended != 2) {
lmm_update_variable_weight(cpu_im_maxmin_system,
((surf_action_lmm_t) action)->variable,
((surf_action_lmm_t) action)->suspended = 0;
xbt_swag_insert(ACTION_GET_CPU(action), cpu_im_modified_cpu);
}
((surf_action_lmm_t) action)->suspended = 0;
xbt_swag_insert(ACTION_GET_CPU(action), cpu_im_modified_cpu);
}
}
static int cpu_im_action_is_suspended(surf_action_t action)
}
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)
{
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);
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);
}
static void cpu_im_action_set_priority(surf_action_t action,
double priority)
{
}
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);
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);
}
#ifdef HAVE_TRACING
static void cpu_im_action_set_category(surf_action_t action,
const char *category)
{
}
#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);
action->category = xbt_strdup (category);
}
#endif
static double cpu_im_action_get_remains(surf_action_t action)
{
}
#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;
/* update remains before return it */
cpu_im_update_remains(ACTION_GET_CPU(action), surf_get_clock());
return action->remains;
}
static e_surf_resource_state_t cpu_im_get_state(void *cpu)
}
static e_surf_resource_state_t cpu_im_get_state(void *cpu)
surf_action_cpu_ti_t action = NULL;
cpu_ti_t CPU = cpu;
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);
action =
surf_action_new(sizeof(s_surf_action_cpu_ti_t), size, surf_cpu_model,
CPU->state_current != SURF_RESOURCE_ON);
action->suspended = 0; /* Should be useless because of the
calloc but it seems to help valgrind... */
action->suspended = 0; /* Should be useless because of the
calloc but it seems to help valgrind... */
return (surf_action_t) action;
}
return (surf_action_t) action;
}
if (duration > 0)
duration = MAX(duration, MAXMIN_PRECISION);
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;
action = (surf_action_cpu_ti_t) cpu_ti_execute(cpu, 1.0);
action->generic_action.max_duration = duration;
action->suspended = 2;
cpu_ti_running_action_set_that_does_not_need_being_checked;
xbt_swag_insert(action, ((surf_action_t) action)->state_set);
}
cpu_ti_running_action_set_that_does_not_need_being_checked;
xbt_swag_insert(action, ((surf_action_t) action)->state_set);
}
return (surf_action_t) action;
}
static void cpu_ti_action_suspend(surf_action_t action)
{
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);
}
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);
}
}
static void cpu_ti_action_resume(surf_action_t action)
{
}
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);
}
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);
}
}
static int cpu_ti_action_is_suspended(surf_action_t action)
}
static int cpu_ti_action_is_suspended(surf_action_t action)
surf_action_cpu_ti_t ACT = (surf_action_cpu_ti_t) action;
double min_finish;
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;
action->max_duration = duration;
}
xbt_heap_push(cpu_ti_action_heap, ACT, min_finish);
}
xbt_heap_push(cpu_ti_action_heap, ACT, min_finish);
}
static void cpu_ti_action_set_priority(surf_action_t action,
double priority)
{
}
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);
action->priority = priority;
xbt_swag_insert(ACTION_GET_CPU(action), cpu_ti_modified_cpu);
}
static double cpu_ti_action_get_remains(surf_action_t action)
{
}
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;
cpu_ti_update_remaining_amount((cpu_ti_t)
((surf_action_cpu_ti_t) action)->cpu,
surf_get_clock());
return action->remains;
}
static e_surf_resource_state_t cpu_ti_get_state(void *cpu)
}
static e_surf_resource_state_t cpu_ti_get_state(void *cpu)
double diff_0 = 0.0;
min = max = init;
double diff_0 = 0.0;
min = max = init;
if (init == 0.0) {
min = max = 0.5;
if (init == 0.0) {
min = max = 0.5;
if ((diff_0 = diff(1e-16, var_cnst)) >= 0) {
XBT_CDEBUG(surf_lagrange_dichotomy, "returning 0.0 (diff = %e)", diff_0);
if ((diff_0 = diff(1e-16, var_cnst)) >= 0) {
XBT_CDEBUG(surf_lagrange_dichotomy, "returning 0.0 (diff = %e)", diff_0);
}
XBT_CDEBUG(surf_lagrange_dichotomy, "returning %e", (min + max) / 2.0);
}
XBT_CDEBUG(surf_lagrange_dichotomy, "returning %e", (min + max) / 2.0);
return ((min + max) / 2.0);
}
return ((min + max) / 2.0);
}
double diff = 0.0;
double sigma_i = 0.0;
double diff = 0.0;
double sigma_i = 0.0;
elem_list = &(cnst->element_set);
XBT_CDEBUG(surf_lagrange_dichotomy, "Computing diff of cnst (%p)", cnst);
elem_list = &(cnst->element_set);
XBT_CDEBUG(surf_lagrange_dichotomy, "Computing diff of cnst (%p)", cnst);
XBT_CDEBUG(surf_lagrange_dichotomy,
"d D/d lambda for cnst (%p) at %1.20f = %1.20f", cnst, lambda,
diff);
XBT_CDEBUG(surf_lagrange_dichotomy,
"d D/d lambda for cnst (%p) at %1.20f = %1.20f", cnst, lambda,
diff);
int i;
lmm_element_t elem = NULL;
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++) {
sys->modified = 1;
for (i = 0; i < var->cnsts_number; i++) {
lmm_update_modified_set(sys, elem->constraint);
}
var->cnsts_number = 0;
lmm_update_modified_set(sys, elem->constraint);
}
var->cnsts_number = 0;
}
static void lmm_var_free(lmm_system_t sys, lmm_variable_t var)
}
static void lmm_var_free(lmm_system_t sys, lmm_variable_t var)
lmm_variable_t var = NULL;
int i;
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);
sys, id, weight, bound, number_of_constraints);
var = xbt_mallocator_get(sys->variable_mallocator);
xbt_swag_insert_at_head(var, &(sys->variable_set));
else
xbt_swag_insert_at_tail(var, &(sys->variable_set));
xbt_swag_insert_at_head(var, &(sys->variable_set));
else
xbt_swag_insert_at_tail(var, &(sys->variable_set));
{
lmm_constraint_t useless_cnst = NULL;
{
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);
return;
}
if (cnst->remaining <= 0) {
return;
}
if (cnst->remaining <= 0) {
return;
}
if ((*min_usage < 0) || (*min_usage > cnst->remaining / cnst->usage)) {
return;
}
if ((*min_usage < 0) || (*min_usage > cnst->remaining / cnst->usage)) {
} else if (*min_usage == cnst->remaining / cnst->usage) {
xbt_swag_insert(cnst, &(sys->saturated_constraint_set));
}
} else if (*min_usage == cnst->remaining / cnst->usage) {
xbt_swag_insert(cnst, &(sys->saturated_constraint_set));
}
}
static XBT_INLINE void saturated_variable_set_update(lmm_system_t sys)
}
static XBT_INLINE void saturated_variable_set_update(lmm_system_t sys)
if (!(sys->modified))
return;
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.
/*
* Compute Usage and store the variables that reach the maximum.
if (XBT_LOG_ISENABLED(surf_maxmin, xbt_log_priority_debug)) {
lmm_print(sys);
}
if (XBT_LOG_ISENABLED(surf_maxmin, xbt_log_priority_debug)) {
lmm_print(sys);
}
}
/* Not a O(1) function */
}
/* Not a O(1) function */
if (weight == var->weight)
return;
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));
sys->modified = 1;
var->weight = weight;
xbt_swag_remove(var, &(sys->variable_set));
if (!weight)
var->value = 0.0;
if (!weight)
var->value = 0.0;
}
XBT_INLINE double lmm_get_variable_weight(lmm_variable_t var)
}
XBT_INLINE double lmm_get_variable_weight(lmm_variable_t var)
/* LARGE PLATFORMS HACK:
total_route_size = route_size + src->link_nb + dst->nb */
/* 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);
/* LARGE PLATFORMS HACK:
assert on total_route_size */
latency = global_routing->get_latency(src_name,dst_name);
#endif
xbt_dynar_free(&route);
#endif
xbt_dynar_free(&route);
return (surf_action_t) action;
}
return (surf_action_t) action;
}
{
surf_action_network_Constant_t action = NULL;
{
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,
action =
surf_action_new(sizeof(s_surf_action_network_Constant_t), size,
xbt_swag_insert(action, action->generic_action.state_set);
}
xbt_swag_insert(action, action->generic_action.state_set);
}
return (surf_action_t) action;
}
return (surf_action_t) action;
}
int i = 0;
int *gtnets_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 */
src_id, dst_id, links, nb_link);
/* Build the list of gtnets link IDs */
if (gtnets_add_route(src_id, dst_id, gtnets_links, nb_link)) {
xbt_assert0(0, "Cannot create GTNetS route");
}
if (gtnets_add_route(src_id, dst_id, gtnets_links, nb_link)) {
xbt_assert0(0, "Cannot create GTNetS route");
}
}
static void route_onehop_new(int src_id, int dst_id,
}
static void route_onehop_new(int src_id, int dst_id,
/* LARGE PLATFORMS HACK:
total_route_size = route_size + src->link_nb + dst->nb */
/* 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),
/* LARGE PLATFORMS HACK:
assert on total_route_size */
xbt_assert2(xbt_dynar_length(route),
#endif
xbt_dynar_free(&route);
#endif
xbt_dynar_free(&route);
return (surf_action_t) action;
}
return (surf_action_t) action;
}
e_surf_action_state_t state)
{
surf_action_state_t action_state = &(action->model_type->states);
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)
xbt_swag_remove(action, action->state_set);
if (state == SURF_ACTION_READY)
if (action->state_set)
xbt_swag_insert(action, action->state_set);
if (action->state_set)
xbt_swag_insert(action, action->state_set);
}
void surf_action_data_set(surf_action_t action, void *data)
}
void surf_action_data_set(surf_action_t action, void *data)
static void ptask_action_suspend(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);
}
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);
}
}
static void ptask_action_resume(surf_action_t action)
}
static void ptask_action_resume(surf_action_t action)
surf_action_workstation_L07_t act =
(surf_action_workstation_L07_t) action;
surf_action_workstation_L07_t act =
(surf_action_workstation_L07_t) action;
if (act->suspended != 2) {
lmm_update_variable_weight(ptask_maxmin_system, act->variable, 1.0);
act->suspended = 0;
}
if (act->suspended != 2) {
lmm_update_variable_weight(ptask_maxmin_system, act->variable, 1.0);
act->suspended = 0;
}
}
static int ptask_action_is_suspended(surf_action_t action)
}
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 */
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;
action->max_duration = duration;
}
static void ptask_action_set_priority(surf_action_t action,
double priority)
{ /* FIXME: should inherit */
}
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;
action->priority = priority;
}
static double ptask_action_get_remains(surf_action_t action)
{
}
static double ptask_action_get_remains(surf_action_t action)
{
- XBT_IN_F("(%p)", action);
+ XBT_IN("(%p)", action);
}
/**************************************/
}
/**************************************/
{
surf_action_workstation_L07_t action = NULL;
{
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);
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);
return (surf_action_t) action;
}
return (surf_action_t) action;
}
if (!options || !strlen(options)) { /* nothing to do */
return;
}
if (!options || !strlen(options)) { /* nothing to do */
return;
}
first argument.
The TRACE priority is not used the same way than the other. You should use
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
\section log_API_example 2.6 Example of use