#! ./tesh
$ ${bindir:=.}/io-storage$EXEEXT ${srcdir:=.}/storage/storage.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [ 0.000000] (1:(null)@denise) *** Storage info on denise ***
-> [ 0.000000] (1:(null)@denise) Storage name: Disk2, mount name: c:
-> [ 0.000000] (1:(null)@denise) Total size: 536870912000 bytes
-> [ 0.000000] (1:(null)@denise) Free size: 534479374867 bytes
-> [ 0.000000] (1:(null)@denise) Used size: 2391537133 bytes
-> [ 0.000000] (1:(null)@denise) Storage name: Disk4, mount name: /home
-> [ 0.000000] (1:(null)@denise) Total size: 536870912000 bytes
-> [ 0.000000] (1:(null)@denise) Free size: 536857690006 bytes
-> [ 0.000000] (1:(null)@denise) Used size: 13221994 bytes
-> [ 0.003333] (1:(null)@denise) Create a 200000 bytes file named '/home/tmp/data.txt' on /sd1
-> [ 0.003333] (1:(null)@denise) File Descriptor information:
+> [ 0.000000] (1:@denise) *** Storage info on denise ***
+> [ 0.000000] (1:@denise) Storage name: Disk2, mount name: c:
+> [ 0.000000] (1:@denise) Total size: 536870912000 bytes
+> [ 0.000000] (1:@denise) Free size: 534479374867 bytes
+> [ 0.000000] (1:@denise) Used size: 2391537133 bytes
+> [ 0.000000] (1:@denise) Storage name: Disk4, mount name: /home
+> [ 0.000000] (1:@denise) Total size: 536870912000 bytes
+> [ 0.000000] (1:@denise) Free size: 536857690006 bytes
+> [ 0.000000] (1:@denise) Used size: 13221994 bytes
+> [ 0.003333] (1:@denise) Create a 200000 bytes file named '/home/tmp/data.txt' on /sd1
+> [ 0.003333] (1:@denise) File Descriptor information:
> Full path: '/home/tmp/data.txt'
> Size: 200000
> Mount point: '/home'
> Storage Type: 'single_SSD'
> Content Type: 'txt_unix'
> File Descriptor Id: 0
-> [ 0.003333] (1:(null)@denise) Free size: 536857490006 bytes
-> [ 0.003333] (1:(null)@denise) Used size: 13421994 bytes
-> [ 0.004333] (1:(null)@denise) Read 200000 bytes on /home/tmp/data.txt
-> [ 0.006000] (1:(null)@denise) Write 100000 bytes on /home/tmp/data.txt
-> [ 0.006000] (1:(null)@denise) File Descriptor information:
+> [ 0.003333] (1:@denise) Free size: 536857490006 bytes
+> [ 0.003333] (1:@denise) Used size: 13421994 bytes
+> [ 0.004333] (1:@denise) Read 200000 bytes on /home/tmp/data.txt
+> [ 0.006000] (1:@denise) Write 100000 bytes on /home/tmp/data.txt
+> [ 0.006000] (1:@denise) File Descriptor information:
> Full path: '/home/tmp/data.txt'
> Size: 300000
> Mount point: '/home'
> Storage Type: 'single_SSD'
> Content Type: 'txt_unix'
> File Descriptor Id: 0
-> [ 0.006000] (1:(null)@denise) *** Move '/tmp/data.txt' into '/tmp/simgrid.readme'
-> [ 0.006000] (1:(null)@denise) User data attached to the file: 777
-> [ 0.006000] (1:(null)@denise) *** Get/set data for storage element: Disk4 ***
-> [ 0.006000] (1:(null)@denise) Get storage data: '(null)'
-> [ 0.006000] (1:(null)@denise) Set and get data: 'Some user data'
-> [ 0.006000] (1:(null)@denise) *** Dump content of denise ***
-> [ 0.006000] (1:(null)@denise) Print the content of mount point: c:
-> [ 0.006000] (1:(null)@denise) \Windows\win.ini size: 92 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\mib.bin size: 43131 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\DtcInstall.log size: 1955 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\vmgcoinstall.log size: 1585 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\Starter.xml size: 31537 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\_isusr32.dll size: 180320 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\winhlp32.exe size: 10752 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\setuperr.log size: 0 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\system.ini size: 219 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\hapint.exe size: 382056 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\Professional.xml size: 31881 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\regedit.exe size: 159232 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\setupact.log size: 101663 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\WindowsUpdate.log size: 1518934 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\explorer.exe size: 2380944 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\DirectX.log size: 10486 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\WMSysPr9.prx size: 316640 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\PFRO.log size: 6770 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\csup.txt size: 12 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\WLXPGSS.SCR size: 322048 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\avastSS.scr size: 41664 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\font1.sii size: 4907 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\write.exe size: 10752 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\font2.sii size: 8698 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\CoreSingleLanguage.xml size: 31497 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\dchcfg64.exe size: 335464 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\notepad.exe size: 243712 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\HelpPane.exe size: 883712 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\hh.exe size: 17408 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\DPINST.LOG size: 18944 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\bfsvc.exe size: 75264 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\splwow64.exe size: 126464 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\MEMORY.DMP size: 2384027342 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\dcmdev64.exe size: 93288 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\twain_32.dll size: 50176 bytes
-> [ 0.006000] (1:(null)@denise) \Windows\bootstat.dat size: 67584 bytes
-> [ 0.006000] (1:(null)@denise) Print the content of mount point: /home
-> [ 0.006000] (1:(null)@denise) /include/simix/simix.h size: 13003 bytes
-> [ 0.006000] (1:(null)@denise) /include/mc/modelchecker.h size: 96 bytes
-> [ 0.006000] (1:(null)@denise) /doc/simgrid/examples/msg/README size: 4805 bytes
-> [ 0.006000] (1:(null)@denise) /include/instr/instr.h size: 5750 bytes
-> [ 0.006000] (1:(null)@denise) /doc/simgrid/examples/smpi/mc_bugged2.c size: 1387 bytes
-> [ 0.006000] (1:(null)@denise) /doc/simgrid/html/group__XBT__str.html size: 36192 bytes
-> [ 0.006000] (1:(null)@denise) /doc/simgrid/examples/smpi/NAS/EP/README size: 347 bytes
-> [ 0.006000] (1:(null)@denise) /doc/simgrid/examples/smpi/NAS/DT/README size: 999 bytes
-> [ 0.006000] (1:(null)@denise) /doc/simgrid/examples/smpi/NAS/FT/README size: 276 bytes
-> [ 0.006000] (1:(null)@denise) /lib/libsimgrid.so.3.6.2 size: 12710497 bytes
-> [ 0.006000] (1:(null)@denise) /doc/simgrid/examples/smpi/NAS/sys/README size: 1461 bytes
-> [ 0.006000] (1:(null)@denise) /doc/simgrid/examples/msg/alias/masterslave_forwarder_with_alias.c size: 6217 bytes
-> [ 0.006000] (1:(null)@denise) /doc/simgrid/examples/smpi/NAS/SP/README size: 926 bytes
-> [ 0.006000] (1:(null)@denise) /tmp/simgrid.readme size: 300000 bytes
-> [ 0.006000] (1:(null)@denise) /doc/simgrid/examples/msg/parallel_task/test_ptask_deployment.xml size: 654 bytes
-> [ 0.006000] (1:(null)@denise) /doc/simgrid/examples/msg/icomms/small_platform.xml size: 972 bytes
-> [ 0.006000] (1:(null)@denise) /doc/simgrid/examples/smpi/NAS/MG/README size: 5465 bytes
-> [ 0.006000] (1:(null)@denise) /doc/simgrid/examples/msg/trace/test9.xml size: 598 bytes
-> [ 0.006000] (1:(null)@denise) /include/smpi/mpif.h size: 4826 bytes
-> [ 0.006000] (1:(null)@denise) /doc/simgrid/examples/smpi/NAS/README size: 1857 bytes
-> [ 0.006000] (1:(null)@denise) /bin/tesh size: 356434 bytes
-> [ 0.006000] (1:(null)@denise) /include/simdag/simdag.h size: 10325 bytes
-> [ 0.006000] (1:(null)@denise) /doc/simgrid/examples/xbt/sem_basic.c size: 1970 bytes
-> [ 0.006000] (1:(null)@denise) /include/xbt/fifo.h size: 3626 bytes
-> [ 0.006000] (1:(null)@denise) /doc/simgrid/examples/smpi/NAS/common/randdp.c size: 1441 bytes
-> [ 0.006000] (1:(null)@denise) /include/msg/datatypes.h size: 4635 bytes
-> [ 0.006000] (1:(null)@denise) /doc/simgrid/examples/smpi/NAS/EP/randlc.c size: 3300 bytes
-> [ 0.006000] (1:(null)@denise) /doc/simgrid/examples/smpi/NAS/MPI_dummy/README size: 2406 bytes
-> [ 0.006000] (1:(null)@denise) /doc/simgrid/examples/platforms/g5k.xml size: 17028 bytes
-> [ 0.006000] (1:(null)@denise) /include/surf/simgrid_dtd.h size: 23583 bytes
-> [ 0.006000] (1:(null)@denise) /bin/smpicc size: 918 bytes
+> [ 0.006000] (1:@denise) *** Move '/tmp/data.txt' into '/tmp/simgrid.readme'
+> [ 0.006000] (1:@denise) User data attached to the file: 777
+> [ 0.006000] (1:@denise) *** Get/set data for storage element: Disk4 ***
+> [ 0.006000] (1:@denise) Get storage data: '(null)'
+> [ 0.006000] (1:@denise) Set and get data: 'Some user data'
+> [ 0.006000] (1:@denise) *** Dump content of denise ***
+> [ 0.006000] (1:@denise) Print the content of mount point: c:
+> [ 0.006000] (1:@denise) \Windows\win.ini size: 92 bytes
+> [ 0.006000] (1:@denise) \Windows\mib.bin size: 43131 bytes
+> [ 0.006000] (1:@denise) \Windows\DtcInstall.log size: 1955 bytes
+> [ 0.006000] (1:@denise) \Windows\vmgcoinstall.log size: 1585 bytes
+> [ 0.006000] (1:@denise) \Windows\Starter.xml size: 31537 bytes
+> [ 0.006000] (1:@denise) \Windows\_isusr32.dll size: 180320 bytes
+> [ 0.006000] (1:@denise) \Windows\winhlp32.exe size: 10752 bytes
+> [ 0.006000] (1:@denise) \Windows\setuperr.log size: 0 bytes
+> [ 0.006000] (1:@denise) \Windows\system.ini size: 219 bytes
+> [ 0.006000] (1:@denise) \Windows\hapint.exe size: 382056 bytes
+> [ 0.006000] (1:@denise) \Windows\Professional.xml size: 31881 bytes
+> [ 0.006000] (1:@denise) \Windows\regedit.exe size: 159232 bytes
+> [ 0.006000] (1:@denise) \Windows\setupact.log size: 101663 bytes
+> [ 0.006000] (1:@denise) \Windows\WindowsUpdate.log size: 1518934 bytes
+> [ 0.006000] (1:@denise) \Windows\explorer.exe size: 2380944 bytes
+> [ 0.006000] (1:@denise) \Windows\DirectX.log size: 10486 bytes
+> [ 0.006000] (1:@denise) \Windows\WMSysPr9.prx size: 316640 bytes
+> [ 0.006000] (1:@denise) \Windows\PFRO.log size: 6770 bytes
+> [ 0.006000] (1:@denise) \Windows\csup.txt size: 12 bytes
+> [ 0.006000] (1:@denise) \Windows\WLXPGSS.SCR size: 322048 bytes
+> [ 0.006000] (1:@denise) \Windows\avastSS.scr size: 41664 bytes
+> [ 0.006000] (1:@denise) \Windows\font1.sii size: 4907 bytes
+> [ 0.006000] (1:@denise) \Windows\write.exe size: 10752 bytes
+> [ 0.006000] (1:@denise) \Windows\font2.sii size: 8698 bytes
+> [ 0.006000] (1:@denise) \Windows\CoreSingleLanguage.xml size: 31497 bytes
+> [ 0.006000] (1:@denise) \Windows\dchcfg64.exe size: 335464 bytes
+> [ 0.006000] (1:@denise) \Windows\notepad.exe size: 243712 bytes
+> [ 0.006000] (1:@denise) \Windows\HelpPane.exe size: 883712 bytes
+> [ 0.006000] (1:@denise) \Windows\hh.exe size: 17408 bytes
+> [ 0.006000] (1:@denise) \Windows\DPINST.LOG size: 18944 bytes
+> [ 0.006000] (1:@denise) \Windows\bfsvc.exe size: 75264 bytes
+> [ 0.006000] (1:@denise) \Windows\splwow64.exe size: 126464 bytes
+> [ 0.006000] (1:@denise) \Windows\MEMORY.DMP size: 2384027342 bytes
+> [ 0.006000] (1:@denise) \Windows\dcmdev64.exe size: 93288 bytes
+> [ 0.006000] (1:@denise) \Windows\twain_32.dll size: 50176 bytes
+> [ 0.006000] (1:@denise) \Windows\bootstat.dat size: 67584 bytes
+> [ 0.006000] (1:@denise) Print the content of mount point: /home
+> [ 0.006000] (1:@denise) /include/simix/simix.h size: 13003 bytes
+> [ 0.006000] (1:@denise) /include/mc/modelchecker.h size: 96 bytes
+> [ 0.006000] (1:@denise) /doc/simgrid/examples/msg/README size: 4805 bytes
+> [ 0.006000] (1:@denise) /include/instr/instr.h size: 5750 bytes
+> [ 0.006000] (1:@denise) /doc/simgrid/examples/smpi/mc_bugged2.c size: 1387 bytes
+> [ 0.006000] (1:@denise) /doc/simgrid/html/group__XBT__str.html size: 36192 bytes
+> [ 0.006000] (1:@denise) /doc/simgrid/examples/smpi/NAS/EP/README size: 347 bytes
+> [ 0.006000] (1:@denise) /doc/simgrid/examples/smpi/NAS/DT/README size: 999 bytes
+> [ 0.006000] (1:@denise) /doc/simgrid/examples/smpi/NAS/FT/README size: 276 bytes
+> [ 0.006000] (1:@denise) /lib/libsimgrid.so.3.6.2 size: 12710497 bytes
+> [ 0.006000] (1:@denise) /doc/simgrid/examples/smpi/NAS/sys/README size: 1461 bytes
+> [ 0.006000] (1:@denise) /doc/simgrid/examples/msg/alias/masterslave_forwarder_with_alias.c size: 6217 bytes
+> [ 0.006000] (1:@denise) /doc/simgrid/examples/smpi/NAS/SP/README size: 926 bytes
+> [ 0.006000] (1:@denise) /tmp/simgrid.readme size: 300000 bytes
+> [ 0.006000] (1:@denise) /doc/simgrid/examples/msg/parallel_task/test_ptask_deployment.xml size: 654 bytes
+> [ 0.006000] (1:@denise) /doc/simgrid/examples/msg/icomms/small_platform.xml size: 972 bytes
+> [ 0.006000] (1:@denise) /doc/simgrid/examples/smpi/NAS/MG/README size: 5465 bytes
+> [ 0.006000] (1:@denise) /doc/simgrid/examples/msg/trace/test9.xml size: 598 bytes
+> [ 0.006000] (1:@denise) /include/smpi/mpif.h size: 4826 bytes
+> [ 0.006000] (1:@denise) /doc/simgrid/examples/smpi/NAS/README size: 1857 bytes
+> [ 0.006000] (1:@denise) /bin/tesh size: 356434 bytes
+> [ 0.006000] (1:@denise) /include/simdag/simdag.h size: 10325 bytes
+> [ 0.006000] (1:@denise) /doc/simgrid/examples/xbt/sem_basic.c size: 1970 bytes
+> [ 0.006000] (1:@denise) /include/xbt/fifo.h size: 3626 bytes
+> [ 0.006000] (1:@denise) /doc/simgrid/examples/smpi/NAS/common/randdp.c size: 1441 bytes
+> [ 0.006000] (1:@denise) /include/msg/datatypes.h size: 4635 bytes
+> [ 0.006000] (1:@denise) /doc/simgrid/examples/smpi/NAS/EP/randlc.c size: 3300 bytes
+> [ 0.006000] (1:@denise) /doc/simgrid/examples/smpi/NAS/MPI_dummy/README size: 2406 bytes
+> [ 0.006000] (1:@denise) /doc/simgrid/examples/platforms/g5k.xml size: 17028 bytes
+> [ 0.006000] (1:@denise) /include/surf/simgrid_dtd.h size: 23583 bytes
+> [ 0.006000] (1:@denise) /bin/smpicc size: 918 bytes
> [ 0.006000] (0:maestro@) Simulated time: 0.006
class args {
private:
- int argc_;
- char** argv_;
+ int argc_ = 0;
+ char** argv_ = nullptr;
public:
// Main constructors
- args() : argc_(0), argv_(nullptr) {}
- args(int argc, char** argv) : argc_(argc), argv_(argv) {}
+ args() {}
+
+ void assign(int argc, const char*const* argv)
+ {
+ clear();
+ char** new_argv = xbt_new(char*,argc + 1);
+ for (int i = 0; i < argc; i++)
+ new_argv[i] = xbt_strdup(argv[i]);
+ new_argv[argc] = nullptr;
+ this->argc_ = argc;
+ this->argv_ = new_argv;
+ }
+ args(int argc, const char*const* argv)
+ {
+ this->assign(argc, argv);
+ }
+
+ char** to_argv() const
+ {
+ const int argc = argc_;
+ char** argv = xbt_new(char*, argc + 1);
+ for (int i=0; i< argc; i++)
+ argv[i] = xbt_strdup(argv_[i]);
+ argv[argc] = nullptr;
+ return argv;
+ }
// Free
void clear()
~args() { clear(); }
// Copy
- args(args const& that) = delete;
- args& operator=(args const& that) = delete;
+ args(args const& that)
+ {
+ this->assign(that.argc(), that.argv());
+ }
+ args& operator=(args const& that)
+ {
+ this->assign(that.argc(), that.argv());
+ return *this;
+ }
// Move:
args(args&& that) : argc_(that.argc_), argv_(that.argv_)
};
inline
-std::function<void()> wrap_main(xbt_main_func_t code, int argc, char **argv)
+std::function<void()> wrap_main(xbt_main_func_t code, int argc, const char*const* argv)
{
if (code) {
auto arg = std::make_shared<simgrid::simix::args>(argc, argv);
char *instr_process_id (msg_process_t proc, char *str, int len)
{
- return instr_process_id_2 (proc->name, proc->pid, str, len);//MSG_process_get_name(proc), MSG_process_get_PID(proc), str, len);
+ return instr_process_id_2 (proc->name.c_str(), proc->pid, str, len);//MSG_process_get_name(proc), MSG_process_get_PID(proc), str, len);
}
char *instr_process_id_2 (const char *process_name, int process_pid, char *str, int len)
{
if (TRACE_msg_process_is_enabled() && status==SMX_EXIT_FAILURE){
//kill means that this process no longer exists, let's destroy it
- TRACE_msg_process_destroy(process->name, process->pid);
+ TRACE_msg_process_destroy(process->name.c_str(), process->pid);
}
}
simcall_process_set_data(smx_proc, NULL);
}
- TRACE_msg_process_destroy(smx_proc->name, smx_proc->pid);
+ TRACE_msg_process_destroy(smx_proc->name.c_str(), smx_proc->pid);
// free the data if a function was provided
if (msg_proc && msg_proc->data && msg_global->process_data_cleanup) {
msg_global->process_data_cleanup(msg_proc->data);
void simcall_call(smx_process_t process)
{
if (process != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", process->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", process->name.c_str(),
SIMIX_simcall_name(process->simcall.call), (int)process->simcall.call);
SIMIX_process_yield(process);
} else {
xbt_dict_t properties,
int auto_restart)
{
+ if (name == nullptr)
+ name = "";
return (smx_process_t) simcall_BODY_process_create(name, code, data, hostname,
kill_time, argc, argv, properties,
auto_restart);
if (kill_time > SIMIX_get_clock()) {
if (simix_global->kill_process_function) {
- XBT_DEBUG("Set kill time %f for process %s(%s)",kill_time, process->name,
+ XBT_DEBUG("Set kill time %f for process %s(%s)",
+ kill_time, process->name.c_str(),
sg_host_get_name(process->host));
process->kill_timer = SIMIX_timer_set(kill_time, kill_process_from_timer, process);
}
{
if (simcall->issuer != simix_global->maestro_process){
XBT_DEBUG("Answer simcall %s (%d) issued by %s (%p)", SIMIX_simcall_name(simcall->call), (int)simcall->call,
- simcall->issuer->name, simcall->issuer);
+ simcall->issuer->name.c_str(), simcall->issuer);
simcall->issuer->simcall.call = SIMCALL_NONE;
/* This check should be useless and slows everyone. Reactivate if you see something
* weird in process scheduling.
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) ind_vm;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) ind_vm;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) ind_vm;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) ind_vm;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) ind_vm;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[7].dp = (void*) properties;
self->simcall.args[8].i = (int) auto_restart;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) process;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].i = (int) reset_pid;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) process;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) process;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) process;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[0].dp = (void*) process;
self->simcall.args[1].dp = (void*) dest;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) process;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[0].dp = (void*) process;
self->simcall.args[1].d = (double) timeout;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].d = (double) duration;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[3].d = (double) bound;
self->simcall.args[4].ul = (unsigned long) affinity_mask;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[5].d = (double) amount;
self->simcall.args[6].d = (double) rate;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) execution;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[0].dp = (void*) execution;
self->simcall.args[1].d = (double) priority;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[0].dp = (void*) execution;
self->simcall.args[1].d = (double) bound;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[1].dp = (void*) ws;
self->simcall.args[2].ul = (unsigned long) mask;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) execution;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[1].fp = (FPtr) fun;
self->simcall.args[2].dp = (void*) data;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[0].dp = (void*) process;
self->simcall.args[1].i = (int) auto_restart;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) process;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].cc = (const char*) name;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[0].dp = (void*) mbox;
self->simcall.args[1].dp = (void*) receiver;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[4].fp = (FPtr) match_fun;
self->simcall.args[5].dp = (void*) data;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[8].dp = (void*) data;
self->simcall.args[9].d = (double) timeout;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[9].dp = (void*) data;
self->simcall.args[10].i = (int) detached;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[7].d = (double) timeout;
self->simcall.args[8].d = (double) rate;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[6].dp = (void*) data;
self->simcall.args[7].d = (double) rate;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) comms;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[0].dp = (void*) comm;
self->simcall.args[1].d = (double) timeout;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) comm;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) comms;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) mutex;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) mutex;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) mutex;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) cond;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[0].dp = (void*) cond;
self->simcall.args[1].dp = (void*) mutex;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[1].dp = (void*) mutex;
self->simcall.args[2].d = (double) timeout;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) cond;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].ui = (unsigned int) capacity;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) sem;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) sem;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) sem;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[0].dp = (void*) sem;
self->simcall.args[1].d = (double) timeout;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) sem;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[1].sgsz = (sg_size_t) size;
self->simcall.args[2].dp = (void*) host;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[1].sgsz = (sg_size_t) size;
self->simcall.args[2].dp = (void*) host;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[0].cc = (const char*) fullpath;
self->simcall.args[1].dp = (void*) host;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[0].dp = (void*) fd;
self->simcall.args[1].dp = (void*) host;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[0].dp = (void*) fd;
self->simcall.args[1].dp = (void*) host;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) fd;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) fd;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[1].sgoff = (sg_offset_t) offset;
self->simcall.args[2].i = (int) origin;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) fd;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[0].dp = (void*) fd;
self->simcall.args[1].cc = (const char*) fullpath;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) storage;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) name;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) storage;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) storage;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].cc = (const char*) name;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[0].i = (int) min;
self->simcall.args[1].i = (int) max;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
self->simcall.args[0].dp = (void*) synchro;
self->simcall.args[1].cc = (const char*) category;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) code;
if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name.c_str(),
SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
SIMIX_process_yield(self);
} else {
*/
XBT_INFO("Process %lu (%s@%s): waiting for %s synchro %p (%s) in state %d to finish",
- process->pid, process->name, sg_host_get_name(process->host),
+ process->pid, process->name.c_str(), sg_host_get_name(process->host),
synchro_description, process->waiting_synchro,
process->waiting_synchro->name, (int)process->waiting_synchro->state);
}
else {
- XBT_INFO("Process %lu (%s@%s)", process->pid, process->name, sg_host_get_name(process->host));
+ XBT_INFO("Process %lu (%s@%s)", process->pid, process->name.c_str(), sg_host_get_name(process->host));
}
}
}
unsigned int cpt;
smx_process_arg_t arg;
xbt_dynar_foreach(host->boot_processes,cpt,arg) {
-
- char** argv = xbt_new(char*, arg->argc);
- for (int i=0; i<arg->argc; i++)
- argv[i] = xbt_strdup(arg->argv[i]);
-
- XBT_DEBUG("Booting Process %s(%s) right now", arg->argv[0], arg->hostname);
+ XBT_DEBUG("Booting Process %s(%s) right now",
+ arg->name.c_str(), arg->hostname);
if (simix_global->create_process_function) {
- simix_global->create_process_function(argv[0],
+ simix_global->create_process_function(arg->name.c_str(),
arg->code,
NULL,
arg->hostname,
arg->kill_time,
- arg->argc,
- argv,
+ arg->args.argc(), arg->args.to_argv(),
arg->properties,
arg->auto_restart,
NULL);
} else {
- simcall_process_create(arg->argv[0],
+ simcall_process_create(arg->name.c_str(),
arg->code,
NULL,
arg->hostname,
arg->kill_time,
- arg->argc,
- argv,
+ arg->args.argc(), arg->args.to_argv(),
arg->properties,
arg->auto_restart);
}
smx_process_t process = NULL;
xbt_swag_foreach(process, host->process_list) {
SIMIX_process_kill(process, issuer);
- XBT_DEBUG("Killing %s on %s by %s", process->name, sg_host_get_name(process->host), issuer->name);
+ XBT_DEBUG("Killing %s on %s by %s",
+ process->name.c_str(), sg_host_get_name(process->host),
+ issuer->name.c_str());
}
}
} else {
- XBT_INFO("Host %s is already off",h->name().c_str());
+ XBT_INFO("Host %s is already off", h->name().c_str());
}
}
smx_process_t process = NULL;
xbt_swag_foreach(process, host->process_list) {
- tmp = bprintf("%s\n\t%s", msg, process->name);
+ tmp = bprintf("%s\n\t%s", msg, process->name.c_str());
free(msg);
msg = tmp;
}
void _SIMIX_host_free_process_arg(void *data)
{
smx_process_arg_t arg = *(smx_process_arg_t*)data;
- for (int i = 0; i < arg->argc; i++)
- xbt_free(arg->argv[i]);
- xbt_free(arg->argv);
delete arg;
}
/**
arg->data = data;
arg->hostname = hostname;
arg->kill_time = kill_time;
- arg->argc = argc;
-
- arg->argv = xbt_new(char*,argc + 1);
-
- for (int i = 0; i < argc; i++)
- arg->argv[i] = xbt_strdup(argv[i]);
- arg->argv[argc] = NULL;
-
+ arg->args.assign(argc, argv);
arg->properties = properties;
arg->auto_restart = auto_restart;
xbt_dynar_foreach (process_list, cpt, arg) {
- XBT_DEBUG("Restarting Process %s(%s) right now", arg->argv[0], arg->hostname);
+ XBT_DEBUG("Restarting Process %s(%s) right now", arg->name.c_str(), arg->hostname);
if (simix_global->create_process_function) {
- simix_global->create_process_function(arg->argv[0],
+ simix_global->create_process_function(arg->name.c_str(),
arg->code,
NULL,
arg->hostname,
arg->kill_time,
- arg->argc,
- arg->argv,
+ arg->args.argc(), arg->args.to_argv(),
arg->properties,
arg->auto_restart,
NULL);
} else {
- simcall_process_create(arg->argv[0],
+ simcall_process_create(arg->name.c_str(),
(xbt_main_func_t) arg->code,
NULL,
arg->hostname,
arg->kill_time,
- arg->argc,
- arg->argv,
+ arg->args.argc(), arg->args.to_argv(),
arg->properties,
arg->auto_restart);
-
}
- /* arg->argv is used by the process created above. Hide it to
- * _SIMIX_host_free_process_arg() which is called by xbt_dynar_reset()
- * below. */
- arg->argc = 0;
- arg->argv = NULL;
}
xbt_dynar_reset(process_list);
}
if (SIMIX_process_is_suspended(comm->src_proc) || SIMIX_process_is_suspended(comm->dst_proc)) {
if (SIMIX_process_is_suspended(comm->src_proc))
XBT_DEBUG("The communication is suspended on startup because src (%s@%s) was suspended since it initiated the communication",
- comm->src_proc->name, sg_host_get_name(comm->src_proc->host));
+ comm->src_proc->name.c_str(), sg_host_get_name(comm->src_proc->host));
else
XBT_DEBUG("The communication is suspended on startup because dst (%s@%s) was suspended since it initiated the communication",
- comm->dst_proc->name, sg_host_get_name(comm->dst_proc->host));
+ comm->dst_proc->name.c_str(), sg_host_get_name(comm->dst_proc->host));
comm->surf_comm->suspend();
}
synchro,
comm->src_proc ? sg_host_get_name(comm->src_proc->host) : NULL,
comm->dst_proc ? sg_host_get_name(comm->dst_proc->host) : NULL,
- simcall->issuer->name, simcall->issuer, comm->detached);
+ simcall->issuer->name.c_str(), simcall->issuer, comm->detached);
if (comm->src_proc == simcall->issuer) {
XBT_DEBUG("I'm source");
} else if (comm->dst_proc == simcall->issuer) {
void SIMIX_process_cleanup(smx_process_t process)
{
XBT_DEBUG("Cleanup process %s (%p), waiting synchro %p",
- process->name, process, process->waiting_synchro);
+ process->name.c_str(), process, process->waiting_synchro);
SIMIX_process_on_exit_runall(process);
xbt_dynar_free(&process->on_exit);
- xbt_free(process->name);
delete process;
}
}
maestro = new simgrid::simix::Process();
maestro->pid = simix_process_maxpid++;
maestro->ppid = -1;
- maestro->name = (char*) "";
+ maestro->name = "";
maestro->data = nullptr;
maestro->running_ctx = (xbt_running_ctx_t*) xbt_malloc0(sizeof(xbt_running_ctx_t));
XBT_RUNNING_CTX_INITIALIZE(maestro->running_ctx);
SIMIX_process_on_exit_runall(arg);
/* Add the process to the list of process to restart, only if the host is down */
if (arg->auto_restart && arg->host->isOff()) {
- SIMIX_host_add_auto_restart_process(arg->host,arg->name,arg->code, arg->data,
+ SIMIX_host_add_auto_restart_process(arg->host, arg->name.c_str(),
+ arg->code, arg->data,
sg_host_get_name(arg->host),
SIMIX_timer_get_date(arg->kill_timer),
- arg->argc,arg->argv,arg->properties,
+ arg->args.argc(), arg->args.argv(), arg->properties,
arg->auto_restart);
}
- XBT_DEBUG("Process %s (%s) is dead",arg->name,sg_host_get_name(arg->host));
+ XBT_DEBUG("Process %s (%s) is dead",
+ arg->name.c_str(), sg_host_get_name(arg->host));
arg->context->stop();
}
xbt_assert(((code != NULL) && (host != NULL)), "Invalid parameters");
/* Process data */
process->pid = simix_process_maxpid++;
- process->name = xbt_strdup(name);
+ process->name = std::string(name);
process->host = host;
process->data = data;
process->comms = xbt_fifo_new();
/* Process data for auto-restart */
process->auto_restart = auto_restart;
process->code = code;
- process->argc = argc;
- process->argv = argv;
+ process->args.assign(argc, argv);
-
- XBT_VERB("Create context %s", process->name);
+ XBT_VERB("Create context %s", process->name.c_str());
process->context = SIMIX_context_new(
simgrid::simix::wrap_main(code, argc, argv),
simix_global->cleanup_process_function, process);
+ for (int i = 0; i < argc; i++)
+ free(argv[i]);
+ free(argv);
+
process->running_ctx = (xbt_running_ctx_t*) xbt_malloc0(sizeof(xbt_running_ctx_t));
XBT_RUNNING_CTX_INITIALIZE(process->running_ctx);
/* Add the process to it's host process list */
xbt_swag_insert(process, sg_host_simix(host)->process_list);
- XBT_DEBUG("Start context '%s'", process->name);
+ XBT_DEBUG("Start context '%s'", process->name.c_str());
/* Now insert it in the global process list and in the process to run list */
xbt_swag_insert(process, simix_global->process_list);
- XBT_DEBUG("Inserting %s(%s) in the to_run list", process->name, sg_host_get_name(host));
+ XBT_DEBUG("Inserting %s(%s) in the to_run list",
+ process->name.c_str(), sg_host_get_name(host));
xbt_dynar_push_as(simix_global->process_to_run, smx_process_t, process);
if (kill_time > SIMIX_get_clock() && simix_global->kill_process_function) {
- XBT_DEBUG("Process %s(%s) will be kill at time %f", process->name,
- sg_host_get_name(process->host), kill_time);
+ XBT_DEBUG("Process %s(%s) will be kill at time %f",
+ process->name.c_str(), sg_host_get_name(process->host), kill_time);
process->kill_timer = SIMIX_timer_set(kill_time, kill_process, process);
}
/* Tracing the process creation */
- TRACE_msg_process_create(process->name, process->pid, process->host);
+ TRACE_msg_process_create(process->name.c_str(), process->pid, process->host);
}
return process;
}
smx_process_t process = new simgrid::simix::Process();
/* Process data */
process->pid = simix_process_maxpid++;
- process->name = xbt_strdup(name);
+ process->name = std::string(name);
process->host = host;
process->data = data;
process->comms = xbt_fifo_new();
/* Process data for auto-restart */
process->auto_restart = false;
process->code = nullptr;
- process->argc = 0;
- process->argv = nullptr;
- XBT_VERB("Create context %s", process->name);
+ XBT_VERB("Create context %s", process->name.c_str());
if (!simix_global)
xbt_die("simix is not initialized, please call MSG_init first");
process->context = simix_global->context_factory->attach(
/* Now insert it in the global process list and in the process to run list */
xbt_swag_insert(process, simix_global->process_list);
- XBT_DEBUG("Inserting %s(%s) in the to_run list", process->name, sg_host_get_name(host));
+ XBT_DEBUG("Inserting %s(%s) in the to_run list",
+ process->name.c_str(), sg_host_get_name(host));
xbt_dynar_push_as(simix_global->process_to_run, smx_process_t, process);
/* Tracing the process creation */
- TRACE_msg_process_create(process->name, process->pid, process->host);
+ TRACE_msg_process_create(process->name.c_str(), process->pid, process->host);
auto context = dynamic_cast<simgrid::simix::AttachContext*>(process->context);
if (!context)
*/
void SIMIX_process_kill(smx_process_t process, smx_process_t issuer) {
- XBT_DEBUG("Killing process %s on %s", process->name, sg_host_get_name(process->host));
+ XBT_DEBUG("Killing process %s on %s",
+ process->name.c_str(), sg_host_get_name(process->host));
process->context->iwannadie = 1;
process->blocked = 0;
process->waiting_synchro = NULL;
}
if(!xbt_dynar_member(simix_global->process_to_run, &(process)) && process != issuer) {
- XBT_DEBUG("Inserting %s in the to_run list", process->name);
+ XBT_DEBUG("Inserting %s in the to_run list", process->name.c_str());
xbt_dynar_push_as(simix_global->process_to_run, smx_process_t, process);
}
if (sleep != nullptr) {
SIMIX_process_sleep_destroy(process->waiting_synchro);
if (!xbt_dynar_member(simix_global->process_to_run, &(process)) && process != SIMIX_process_self()) {
- XBT_DEBUG("Inserting %s in the to_run list", process->name);
+ XBT_DEBUG("Inserting %s in the to_run list", process->name.c_str());
xbt_dynar_push_as(simix_global->process_to_run, smx_process_t, process);
}
}
smx_synchro_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer)
{
if (process->suspended) {
- XBT_DEBUG("Process '%s' is already suspended", process->name);
+ XBT_DEBUG("Process '%s' is already suspended", process->name.c_str());
return NULL;
}
const char* SIMIX_process_get_name(smx_process_t process)
{
- return process->name;
+ return process->name.c_str();
}
smx_process_t SIMIX_process_get_by_name(const char* name)
{
smx_process_t proc;
-
- xbt_swag_foreach(proc, simix_global->process_list)
- {
- if(!strcmp(name, proc->name))
+ xbt_swag_foreach(proc, simix_global->process_list) {
+ if (proc->name == name)
return proc;
}
return NULL;
*/
void SIMIX_process_yield(smx_process_t self)
{
- XBT_DEBUG("Yield process '%s'", self->name);
+ XBT_DEBUG("Yield process '%s'", self->name.c_str());
/* Go into sleep and return control to maestro */
self->context->suspend();
/* Ok, maestro returned control to us */
- XBT_DEBUG("Control returned to me: '%s'", self->name);
+ XBT_DEBUG("Control returned to me: '%s'", self->name.c_str());
if (self->new_host) {
SIMIX_process_change_host(self, self->new_host);
}
/** @brief Restart a process, starting it again from the beginning. */
smx_process_t SIMIX_process_restart(smx_process_t process, smx_process_t issuer) {
- XBT_DEBUG("Restarting process %s on %s", process->name, sg_host_get_name(process->host));
+ XBT_DEBUG("Restarting process %s on %s",
+ process->name.c_str(), sg_host_get_name(process->host));
+
//retrieve the arguments of the old process
//FIXME: Factorize this with SIMIX_host_add_auto_restart_process ?
simgrid::simix::ProcessArg arg;
+ arg.name = process->name;
arg.code = process->code;
arg.hostname = sg_host_get_name(process->host);
arg.kill_time = SIMIX_timer_get_date(process->kill_timer);
- arg.argc = process->argc;
arg.data = process->data;
- int i;
- arg.argv = xbt_new(char*,process->argc + 1);
- for (i = 0; i < arg.argc; i++) {
- arg.argv[i] = xbt_strdup(process->argv[i]);
- }
- arg.argv[process->argc] = NULL;
arg.properties = NULL;
arg.auto_restart = process->auto_restart;
+ arg.args = process->args;
+
//kill the old process
- SIMIX_process_kill(process,issuer);
- //start the new process
- smx_process_t new_process;
- if (simix_global->create_process_function) {
- new_process = simix_global->create_process_function(
- arg.argv[0],
- arg.code,
- arg.data,
- arg.hostname,
- arg.kill_time,
- arg.argc,
- arg.argv,
- arg.properties,
- arg.auto_restart,
- NULL);
- } else {
- new_process = simcall_process_create(
- arg.argv[0],
- arg.code,
- arg.data,
- arg.hostname,
- arg.kill_time,
- arg.argc,
- arg.argv,
- arg.properties,
- arg.auto_restart);
+ SIMIX_process_kill(process, issuer);
- }
- return new_process;
+ //start the new process
+ if (simix_global->create_process_function)
+ return simix_global->create_process_function(
+ arg.name.c_str(), arg.code, arg.data,
+ arg.hostname, arg.kill_time,
+ arg.args.argc(), arg.args.to_argv(),
+ arg.properties, arg.auto_restart,
+ nullptr);
+ else
+ return simcall_process_create(
+ arg.name.c_str(), arg.code, arg.data,
+ arg.hostname, arg.kill_time,
+ arg.args.argc(), arg.args.to_argv(),
+ arg.properties, arg.auto_restart);
}
void SIMIX_segment_index_set(smx_process_t proc, int index){
#include <xbt/base.h>
+#include <simgrid/simix.hpp>
#include "simgrid/simix.h"
#include "popping_private.h"
class ProcessArg {
public:
std::string name;
- xbt_main_func_t code;
- void *data;
- const char *hostname;
- int argc;
- char **argv;
- double kill_time;
- xbt_dict_t properties;
- unsigned auto_restart:1;
+ xbt_main_func_t code = nullptr;
+ simgrid::simix::args args;
+ void *data = nullptr;
+ const char *hostname = nullptr;
+ double kill_time = 0.0;
+ xbt_dict_t properties = nullptr;
+ bool auto_restart = false;
};
class Process {
unsigned long pid = 0;
unsigned long ppid = 0;
- char *name = nullptr; /**< @brief process name if any */
+ std::string name;
sg_host_t host = nullptr; /* the host on which the process is running */
smx_context_t context = nullptr; /* the context (uctx/raw/thread) that executes the user function */
xbt_running_ctx_t *running_ctx = nullptr;
xbt_dynar_t on_exit = nullptr; /* list of functions executed when the process dies */
xbt_main_func_t code = nullptr;
- int argc = 0;
- char **argv = nullptr;
+ simgrid::simix::args args;
smx_timer_t kill_timer = nullptr;
int segment_index = 0; /*Reference to an SMPI process' data segment. Default value is -1 if not in SMPI context*/
};
smx_process_t smx_process, smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, sg_host_simix(ind_vm)->process_list) {
- XBT_DEBUG("suspend %s", smx_process->name);
+ XBT_DEBUG("suspend %s", smx_process->name.c_str());
SIMIX_process_suspend(smx_process, issuer);
}
smx_process_t smx_process, smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, sg_host_simix(ind_vm)->process_list) {
- XBT_DEBUG("resume %s", smx_process->name);
+ XBT_DEBUG("resume %s", smx_process->name.c_str());
SIMIX_process_resume(smx_process, issuer);
}
}
smx_process_t smx_process, smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, sg_host_simix(ind_vm)->process_list) {
- XBT_DEBUG("suspend %s", smx_process->name);
+ XBT_DEBUG("suspend %s", smx_process->name.c_str());
SIMIX_process_suspend(smx_process, issuer);
}
}
smx_process_t smx_process, smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, sg_host_simix(ind_vm)->process_list) {
- XBT_DEBUG("resume %s", smx_process->name);
+ XBT_DEBUG("resume %s", smx_process->name.c_str());
SIMIX_process_resume(smx_process, issuer);
}
}
smx_process_t smx_process, smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, sg_host_simix(ind_vm)->process_list) {
- XBT_DEBUG("kill %s", smx_process->name);
+ XBT_DEBUG("kill %s", smx_process->name.c_str());
SIMIX_process_kill(smx_process, issuer);
}
smx_process_t process_created = NULL;
arg = new simgrid::simix::ProcessArg();
+ arg->name = std::string(process->argv[0]);
arg->code = parse_code;
arg->data = NULL;
arg->hostname = sg_host_get_name(host);
- arg->argc = process->argc;
- arg->argv = xbt_new(char *,process->argc);
- int i;
- for (i=0; i<process->argc; i++)
- arg->argv[i] = xbt_strdup(process->argv[i]);
- arg->name = arg->argv[0];
+ arg->args.assign(process->argc, process->argv);
arg->kill_time = kill_time;
arg->properties = current_property_set;
if (!sg_host_simix(host)->boot_processes)
if (start_time > SIMIX_get_clock()) {
arg = new simgrid::simix::ProcessArg();
- arg->name = process->argv[0];
+ arg->name = std::string(process->argv[0]);
arg->code = parse_code;
arg->data = NULL;
arg->hostname = sg_host_get_name(host);
- arg->argc = process->argc;
- arg->argv = (char**)(process->argv);
+ arg->args.assign(process->argc, process->argv);
arg->kill_time = kill_time;
arg->properties = current_property_set;
arg->data,
arg->hostname,
arg->kill_time,
- arg->argc,
- arg->argv,
+ arg->args.argc(), arg->args.to_argv(),
arg->properties,
arg->auto_restart,
NULL);
NULL,
sg_host_get_name(host),
kill_time,
- process->argc,
- (char**)(process->argv),
+ arg->args.argc(), arg->args.to_argv(),
current_property_set,
auto_restart, NULL);
else
process_created = simcall_process_create(
- arg->name.c_str(), parse_code, NULL, sg_host_get_name(host), kill_time, process->argc,
- (char**)process->argv, current_property_set,auto_restart);
+ arg->name.c_str(), parse_code, NULL, sg_host_get_name(host), kill_time,
+ arg->args.argc(), arg->args.to_argv(), current_property_set,auto_restart);
/* verify if process has been created (won't be the case if the host is currently dead, but that's fine) */
if (!process_created) {