A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix C++ options
[simgrid.git]
/
src
/
surf
/
network_gtnets.c
diff --git
a/src/surf/network_gtnets.c
b/src/surf/network_gtnets.c
index
b959f55
..
8dec8b5
100644
(file)
--- a/
src/surf/network_gtnets.c
+++ b/
src/surf/network_gtnets.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2007
, 2008, 2009, 2010
. The SimGrid Team.
+/* Copyright (c) 2007
-2013
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-62,7
+62,7
@@
static void route_new(int src_id, int dst_id, xbt_dynar_t links,
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 */
- gtnets_links =
(int *) calloc(nb_link, sizeof(int)
);
+ gtnets_links =
xbt_new0(int, nb_link
);
i = 0;
xbt_dynar_foreach(links, cursor, link) {
gtnets_links[i++] = link->id;
i = 0;
xbt_dynar_foreach(links, cursor, link) {
gtnets_links[i++] = link->id;
@@
-196,7
+196,7
@@
static void action_state_set(surf_action_t action,
surf_action_state_set(action, state);
}
surf_action_state_set(action, state);
}
-static double share_resources(double now)
+static double share_resources(
surf_model_t network_model,
double now)
{
xbt_swag_t running_actions =
surf_network_model->states.running_action_set;
{
xbt_swag_t running_actions =
surf_network_model->states.running_action_set;
@@
-210,17
+210,17
@@
static double share_resources(double now)
XBT_DEBUG("Calling gtnets_get_time_to_next_flow_completion");
time_to_next_flow_completion = gtnets_get_time_to_next_flow_completion();
XBT_DEBUG("Calling gtnets_get_time_to_next_flow_completion");
time_to_next_flow_completion = gtnets_get_time_to_next_flow_completion();
- XBT_DEBUG("gtnets_get_time_to_next_flow_completion received %
l
g",
+ XBT_DEBUG("gtnets_get_time_to_next_flow_completion received %g",
time_to_next_flow_completion);
return time_to_next_flow_completion;
}
time_to_next_flow_completion);
return time_to_next_flow_completion;
}
-static void update_actions_state(double now, double delta)
+static void update_actions_state(
surf_model_t network_model,
double now, double delta)
{
surf_action_network_GTNETS_t action = NULL;
xbt_swag_t running_actions =
{
surf_action_network_GTNETS_t action = NULL;
xbt_swag_t running_actions =
-
surf_
network_model->states.running_action_set;
+ network_model->states.running_action_set;
/* If there are no running flows, just return */
if (time_to_next_flow_completion < 0.0) {
/* If there are no running flows, just return */
if (time_to_next_flow_completion < 0.0) {
@@
-400,7
+400,7
@@
static void gtnets_action_set_category(surf_action_t action, const char *categor
}
#endif
}
#endif
-static void finalize(
void
)
+static void finalize(
surf_model_t network_model
)
{
gtnets_finalize();
}
{
gtnets_finalize();
}
@@
-410,6
+410,7
@@
static void surf_network_model_init_internal(void)
surf_network_model = surf_model_init();
surf_network_model->name = "network GTNetS";
surf_network_model = surf_model_init();
surf_network_model->name = "network GTNetS";
+ surf_network_model->type = SURF_MODEL_TYPE_NETWORK;
surf_network_model->action_unref = action_unref;
surf_network_model->action_cancel = action_cancel;
surf_network_model->action_recycle = action_recycle;
surf_network_model->action_unref = action_unref;
surf_network_model->action_cancel = action_cancel;
surf_network_model->action_recycle = action_recycle;