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
First running version after the relocation of the context module [Cristian]
[simgrid.git]
/
src
/
simix
/
xbt_context.c
diff --git
a/src/simix/xbt_context.c
b/src/simix/xbt_context.c
index
da0da65
..
c1f1e65
100644
(file)
--- a/
src/simix/xbt_context.c
+++ b/
src/simix/xbt_context.c
@@
-52,18
+52,12
@@
void SIMIX_context_mod_init(void)
void SIMIX_context_mod_exit(void)
{
if (simix_global->context_factory) {
void SIMIX_context_mod_exit(void)
{
if (simix_global->context_factory) {
- smx_process_t process = NULL;
smx_pfn_context_factory_finalize_t finalize_factory;
smx_pfn_context_factory_finalize_t finalize_factory;
- /* kill all the processes (except maestro)
- * the killed processes are added in the list of the processes to destroy */
+ /* if there are living processes then kill them (except maestro) */
+ if(simix_global->process_list != NULL)
+ SIMIX_process_killall();
- while ((process = xbt_swag_extract(simix_global->process_list)))
- (*(simix_global->context_factory->kill)) (process);
-
- /* destroy all processes in the list of process to destroy */
- SIMIX_context_empty_trash();
-
/* finalize the context factory */
finalize_factory = simix_global->context_factory->finalize;
(*finalize_factory) (&simix_global->context_factory);
/* finalize the context factory */
finalize_factory = simix_global->context_factory->finalize;
(*finalize_factory) (&simix_global->context_factory);
@@
-234,7
+228,6
@@
void SIMIX_context_empty_trash(void)
int i;
while ((process = xbt_swag_extract(simix_global->process_to_destroy))){
int i;
while ((process = xbt_swag_extract(simix_global->process_to_destroy))){
-
free(process->name);
process->name = NULL;
free(process->name);
process->name = NULL;