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
Add msg host on/off test
[simgrid.git]
/
src
/
simix
/
smx_process.c
diff --git
a/src/simix/smx_process.c
b/src/simix/smx_process.c
index
29e3217
..
74a4d26
100644
(file)
--- a/
src/simix/smx_process.c
+++ b/
src/simix/smx_process.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2007-201
3
. The SimGrid Team.
+/* Copyright (c) 2007-201
4
. 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
@@
-26,7
+26,7
@@
XBT_INLINE smx_process_t SIMIX_process_self(void)
{
smx_context_t self_context = SIMIX_context_self();
{
smx_context_t self_context = SIMIX_context_self();
- return self_context ? SIMIX_context_get_
data
(self_context) : NULL;
+ return self_context ? SIMIX_context_get_
process
(self_context) : NULL;
}
/**
}
/**
@@
-491,7
+491,8
@@
smx_action_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer)
return NULL;
}
} else {
return NULL;
}
} else {
- return SIMIX_host_execute("suspend", process->smx_host, 0.0, 1.0);
+ /* FIXME: computation size is zero. Is it okay that bound is zero ? */
+ return SIMIX_host_execute("suspend", process->smx_host, 0.0, 1.0, 0.0, 0);
}
}
}
}
@@
-722,6
+723,8
@@
void SIMIX_post_process_sleep(smx_action_t action)
smx_simcall_t simcall;
e_smx_state_t state;
smx_simcall_t simcall;
e_smx_state_t state;
+ xbt_assert(action->type == SIMIX_ACTION_SLEEP);
+
while ((simcall = xbt_fifo_shift(action->simcalls))) {
switch(surf_action_get_state(action->sleep.surf_sleep)){
while ((simcall = xbt_fifo_shift(action->simcalls))) {
switch(surf_action_get_state(action->sleep.surf_sleep)){
@@
-753,6
+756,8
@@
void SIMIX_post_process_sleep(smx_action_t action)
void SIMIX_process_sleep_destroy(smx_action_t action)
{
XBT_DEBUG("Destroy action %p", action);
void SIMIX_process_sleep_destroy(smx_action_t action)
{
XBT_DEBUG("Destroy action %p", action);
+ xbt_assert(action->type == SIMIX_ACTION_SLEEP);
+
if (action->sleep.surf_sleep)
surf_action_unref(action->sleep.surf_sleep);
xbt_mallocator_release(simix_global->action_mallocator, action);
if (action->sleep.surf_sleep)
surf_action_unref(action->sleep.surf_sleep);
xbt_mallocator_release(simix_global->action_mallocator, action);
@@
-760,11
+765,13
@@
void SIMIX_process_sleep_destroy(smx_action_t action)
void SIMIX_process_sleep_suspend(smx_action_t action)
{
void SIMIX_process_sleep_suspend(smx_action_t action)
{
+ xbt_assert(action->type == SIMIX_ACTION_SLEEP);
surf_action_suspend(action->sleep.surf_sleep);
}
void SIMIX_process_sleep_resume(smx_action_t action)
{
surf_action_suspend(action->sleep.surf_sleep);
}
void SIMIX_process_sleep_resume(smx_action_t action)
{
+ xbt_assert(action->type == SIMIX_ACTION_SLEEP);
surf_action_resume(action->sleep.surf_sleep);
}
surf_action_resume(action->sleep.surf_sleep);
}