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
Put those variables private
[simgrid.git]
/
src
/
surf
/
surf_model.c
diff --git
a/src/surf/surf_model.c
b/src/surf/surf_model.c
index
cd5993a
..
da1bdd7
100644
(file)
--- a/
src/surf/surf_model.c
+++ b/
src/surf/surf_model.c
@@
-1,5
+1,6
@@
-/* Copyright (c) 2009 The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2009, 2010. The SimGrid Team.
+ * All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
@@
-15,6
+16,7
@@
static void void_die_impossible_paction(surf_action_t action)
static int int_die_impossible_paction(surf_action_t action)
{
DIE_IMPOSSIBLE;
static int int_die_impossible_paction(surf_action_t action)
{
DIE_IMPOSSIBLE;
+ return -1;
}
/** @brief initialize common datastructures to all models */
}
/** @brief initialize common datastructures to all models */
@@
-26,27
+28,32
@@
surf_model_t surf_model_init(void)
model->model_private = xbt_new0(s_surf_model_private_t, 1);
model->states.ready_action_set =
model->model_private = xbt_new0(s_surf_model_private_t, 1);
model->states.ready_action_set =
- xbt_swag_new(xbt_swag_offset(action, state_hookup));
+
xbt_swag_new(xbt_swag_offset(action, state_hookup));
model->states.running_action_set =
model->states.running_action_set =
- xbt_swag_new(xbt_swag_offset(action, state_hookup));
+
xbt_swag_new(xbt_swag_offset(action, state_hookup));
model->states.failed_action_set =
model->states.failed_action_set =
- xbt_swag_new(xbt_swag_offset(action, state_hookup));
+
xbt_swag_new(xbt_swag_offset(action, state_hookup));
model->states.done_action_set =
model->states.done_action_set =
- xbt_swag_new(xbt_swag_offset(action, state_hookup));
- model->resource_set = xbt_dict_new();
+ xbt_swag_new(xbt_swag_offset(action, state_hookup));
- model->action_
free
= int_die_impossible_paction;
+ model->action_
unref
= int_die_impossible_paction;
model->action_cancel = void_die_impossible_paction;
model->action_recycle = void_die_impossible_paction;
model->action_state_get = surf_action_state_get;
model->action_cancel = void_die_impossible_paction;
model->action_recycle = void_die_impossible_paction;
model->action_state_get = surf_action_state_get;
+ model->action_state_set = surf_action_state_set;
model->action_get_start_time = surf_action_get_start_time;
model->action_get_finish_time = surf_action_get_finish_time;
model->action_data_set = surf_action_data_set;
model->action_get_start_time = surf_action_get_start_time;
model->action_get_finish_time = surf_action_get_finish_time;
model->action_data_set = surf_action_data_set;
+ model->model_private->modified_set = NULL;
+ model->model_private->action_heap = NULL;
+ model->model_private->update_mechanism = UM_UNDEFINED;
+ model->model_private->selective_update = 0;
return model;
}
return model;
}
+
/** @brief finalize common datastructures to all models */
void surf_model_exit(surf_model_t model)
{
/** @brief finalize common datastructures to all models */
void surf_model_exit(surf_model_t model)
{
@@
-54,14
+61,6
@@
void surf_model_exit(surf_model_t model)
xbt_swag_free(model->states.running_action_set);
xbt_swag_free(model->states.failed_action_set);
xbt_swag_free(model->states.done_action_set);
xbt_swag_free(model->states.running_action_set);
xbt_swag_free(model->states.failed_action_set);
xbt_swag_free(model->states.done_action_set);
- xbt_dict_free(&model->resource_set);
free(model->model_private);
free(model);
}
free(model->model_private);
free(model);
}
-
-void *surf_model_resource_by_name(surf_model_t model, const char *name)
-{
- return xbt_dict_get_or_null(model->resource_set, name);
-}
-
-