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
[simix] Use std::string for s_smx_process_arg
[simgrid.git]
/
src
/
simix
/
smx_host.cpp
diff --git
a/src/simix/smx_host.cpp
b/src/simix/smx_host.cpp
index
2fc7eb4
..
ce5d2a6
100644
(file)
--- a/
src/simix/smx_host.cpp
+++ b/
src/simix/smx_host.cpp
@@
-23,9
+23,9
@@
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_host, simix, "SIMIX hosts");
void SIMIX_host_create(sg_host_t host) // FIXME: braindead prototype. Take sg_host as parameter
{
smx_host_priv_t smx_host = xbt_new0(s_smx_host_priv_t, 1);
void SIMIX_host_create(sg_host_t host) // FIXME: braindead prototype. Take sg_host as parameter
{
smx_host_priv_t smx_host = xbt_new0(s_smx_host_priv_t, 1);
- s_smx_process_t proc;
/* Host structure */
/* Host structure */
+ simgrid::simix::Process proc;
smx_host->process_list = xbt_swag_new(xbt_swag_offset(proc, host_proc_hookup));
/* Update global variables */
smx_host->process_list = xbt_swag_new(xbt_swag_offset(proc, host_proc_hookup));
/* Update global variables */
@@
-165,8
+165,7
@@
void _SIMIX_host_free_process_arg(void *data)
for (int i = 0; i < arg->argc; i++)
xbt_free(arg->argv[i]);
xbt_free(arg->argv);
for (int i = 0; i < arg->argc; i++)
xbt_free(arg->argv[i]);
xbt_free(arg->argv);
- xbt_free(arg->name);
- xbt_free(arg);
+ delete arg;
}
/**
* \brief Add a process to the list of the processes that the host will restart when it comes back
}
/**
* \brief Add a process to the list of the processes that the host will restart when it comes back
@@
-188,8
+187,8
@@
void SIMIX_host_add_auto_restart_process(sg_host_t host,
if (!sg_host_simix(host)->auto_restart_processes) {
sg_host_simix(host)->auto_restart_processes = xbt_dynar_new(sizeof(smx_process_arg_t),_SIMIX_host_free_process_arg);
}
if (!sg_host_simix(host)->auto_restart_processes) {
sg_host_simix(host)->auto_restart_processes = xbt_dynar_new(sizeof(smx_process_arg_t),_SIMIX_host_free_process_arg);
}
- smx_process_arg_t arg =
xbt_new(s_smx_process_arg_t,1
);
- arg->name =
xbt_strdup(name)
;
+ smx_process_arg_t arg =
new s_smx_process_arg_t(
);
+ arg->name =
name
;
arg->code = code;
arg->data = data;
arg->hostname = hostname;
arg->code = code;
arg->data = data;
arg->hostname = hostname;
@@
-384,16
+383,6
@@
void simcall_HANDLER_execution_wait(smx_simcall_t simcall, smx_synchro_t synchro
SIMIX_execution_finish(exec);
}
SIMIX_execution_finish(exec);
}
-void SIMIX_execution_suspend(smx_synchro_t synchro)
-{
- synchro->suspend(); // FIXME: USELESS
-}
-
-void SIMIX_execution_resume(smx_synchro_t synchro)
-{
- synchro->resume(); // FIXME: USELESS
-}
-
void SIMIX_execution_finish(simgrid::simix::Exec *exec)
{
xbt_fifo_item_t item;
void SIMIX_execution_finish(simgrid::simix::Exec *exec)
{
xbt_fifo_item_t item;