-e_smx_state_t execute(double flops) {
- smx_synchro_t s = simcall_execution_start(nullptr,flops,1.0/*priority*/,0./*bound*/, 0L/*affinity*/);
- return simcall_execution_wait(s);
+void execute(double flops)
+{
+ smx_activity_t s = simcall_execution_start(nullptr,flops,1.0/*priority*/,0./*bound*/);
+ simcall_execution_wait(s);
+}
+
+void* recv(MailboxPtr chan) // deprecated
+{
+ return chan->get();
+}
+
+void* recv(MailboxPtr chan, double timeout) // deprecated
+{
+ return chan->get(timeout);
+}
+
+void send(MailboxPtr chan, void* payload, double simulatedSize) // deprecated
+{
+ chan->put(payload, simulatedSize);
+}
+
+void send(MailboxPtr chan, void* payload, double simulatedSize, double timeout) // deprecated
+{
+ chan->put(payload, simulatedSize, timeout);
+}
+
+CommPtr isend(MailboxPtr chan, void* payload, double simulatedSize) // deprecated
+{
+ return chan->put_async(payload, simulatedSize);
+}
+
+CommPtr irecv(MailboxPtr chan, void** data) // deprecated
+{
+ return chan->get_async(data);
+}
+
+aid_t getPid()
+{
+ return SIMIX_process_self()->pid;
+}
+
+aid_t getPpid()
+{
+ return SIMIX_process_self()->ppid;
+}
+
+std::string getName()
+{
+ return SIMIX_process_self()->name;
+}
+
+Host* getHost()
+{
+ return SIMIX_process_self()->host;
+}
+
+void suspend()
+{
+ simcall_process_suspend(SIMIX_process_self());
+}
+
+void resume()
+{
+ smx_actor_t process = SIMIX_process_self();
+ simgrid::simix::kernelImmediate([process] { process->resume(); });