+void Actor::killAll()
+{
+ simcall_process_killall(1);
+}
+
+void Actor::killAll(int resetPid)
+{
+ simcall_process_killall(resetPid);
+}
+
+/** Retrieve the property value (or nullptr if not set) */
+const char* Actor::property(const char* key)
+{
+ return (char*)xbt_dict_get_or_null(simcall_process_get_properties(pimpl_), key);
+}
+void Actor::setProperty(const char* key, const char* value)
+{
+ simgrid::simix::kernelImmediate([this, key, value] {
+ xbt_dict_set(simcall_process_get_properties(pimpl_), key, (char*)value, (void_f_pvoid_t) nullptr);
+ });
+}
+
+// ***** this_actor *****
+
+namespace this_actor {
+
+void sleep_for(double duration)
+{
+ if (duration > 0)
+ simcall_process_sleep(duration);
+}
+
+XBT_PUBLIC(void) sleep_until(double timeout)
+{
+ double now = SIMIX_get_clock();
+ if (timeout > now)
+ simcall_process_sleep(timeout - now);
+}
+
+e_smx_state_t execute(double flops) {
+ smx_activity_t s = simcall_execution_start(nullptr,flops,1.0/*priority*/,0./*bound*/);
+ return simcall_execution_wait(s);
+}
+
+void* recv(MailboxPtr chan) {
+ void *res = nullptr;
+ CommPtr c = Comm::recv_init(chan);
+ c->setDstData(&res, sizeof(res));
+ c->wait();
+ return res;
+}
+
+void send(MailboxPtr chan, void* payload, double simulatedSize)
+{
+ CommPtr c = Comm::send_init(chan);
+ c->setRemains(simulatedSize);
+ c->setSrcData(payload);
+ // c->start() is optional.
+ c->wait();
+}
+
+void send(MailboxPtr chan, void* payload, double simulatedSize, double timeout)
+{
+ CommPtr c = Comm::send_init(chan);
+ c->setRemains(simulatedSize);
+ c->setSrcData(payload);
+ // c->start() is optional.
+ c->wait(timeout);
+}
+
+CommPtr isend(MailboxPtr chan, void* payload, double simulatedSize)
+{
+ return Comm::send_async(chan, payload, simulatedSize);
+}
+void dsend(MailboxPtr chan, void* payload, double simulatedSize)
+{
+ Comm::send_detached(chan, payload, simulatedSize);
+}
+
+CommPtr irecv(MailboxPtr chan, void** data)
+{
+ return Comm::recv_async(chan, data);
+}
+
+aid_t pid()
+{
+ return SIMIX_process_self()->pid;
+}
+
+aid_t ppid()
+{
+ return SIMIX_process_self()->ppid;
+}
+
+std::string name()
+{
+ return SIMIX_process_self()->name;
+}
+
+Host* host()
+{
+ return SIMIX_process_self()->host;
+}
+
+void suspend()
+{
+ simcall_process_suspend(SIMIX_process_self());
+}
+
+void resume()
+{
+ simcall_process_resume(SIMIX_process_self());
+}
+
+int isSuspended()
+{
+ return simcall_process_is_suspended(SIMIX_process_self());
+}
+
+void kill()
+{
+ simcall_process_kill(SIMIX_process_self());
+}
+
+void onExit(int_f_pvoid_pvoid_t fun, void* data)
+{
+ simcall_process_on_exit(SIMIX_process_self(), fun, data);
+}
+
+void migrate(Host* new_host)
+{
+ simcall_process_set_host(SIMIX_process_self(), new_host);
+}
+}