XBT_PUBLIC void simcall_run_blocking(std::function<void()> const& code);
namespace simgrid {
-namespace simix {
+namespace kernel {
+namespace actor {
/** Execute some code in kernel context on behalf of the user code.
*
simcall_run_blocking([&result, &code] { simgrid::xbt::fulfill_promise(result, std::forward<F>(code)); });
return result.get();
}
+} // namespace actor
+} // namespace kernel
+} // namespace simgrid
+namespace simgrid {
+namespace simix {
XBT_ATTRIB_DEPRECATED_v325("Please manifest if you actually need this function")
XBT_PUBLIC const std::vector<smx_actor_t>& process_get_runnable();
typedef decltype(code().get()) T;
// Execute the code in the kernel and get the kernel future:
- simgrid::kernel::Future<T> future = simgrid::simix::simcall(std::move(code));
+ simgrid::kernel::Future<T> future = simgrid::kernel::actor::simcall(std::move(code));
// Wrap the kernel future in a actor future:
return simgrid::simix::Future<T>(std::move(future));
if (simix_global != nullptr && this != simix_global->maestro_process) {
if (context_.get() != nullptr) /* the actor was not start()ed yet. This happens if its host was initially off */
context_->iwannadie = false; // don't let the simcall's yield() do a Context::stop(), to avoid infinite loops
- simgrid::simix::simcall([this] { simgrid::s4u::Actor::on_destruction(*ciface()); });
+ simgrid::kernel::actor::simcall([this] { simgrid::s4u::Actor::on_destruction(*ciface()); });
if (context_.get() != nullptr)
context_->iwannadie = true;
}
simix_global->mutex.unlock();
context_->iwannadie = false; // don't let the simcall's yield() do a Context::stop(), to avoid infinite loops
- simgrid::simix::simcall([this] { simgrid::s4u::Actor::on_termination(*ciface()); });
+ simgrid::kernel::actor::simcall([this] { simgrid::s4u::Actor::on_termination(*ciface()); });
context_->iwannadie = true;
}
sg_host_t host, std::unordered_map<std::string, std::string>* properties)
{
smx_actor_t self = SIMIX_process_self();
- return simgrid::simix::simcall([&name, &code, data, host, properties, self] {
+ return simgrid::kernel::actor::simcall([&name, &code, data, host, properties, self] {
return simgrid::kernel::actor::ActorImpl::create(name, code, data, host, properties, self).get();
});
}
void simcall_process_set_data(smx_actor_t process, void* data)
{
- simgrid::simix::simcall([process, data] { process->set_user_data(data); });
+ simgrid::kernel::actor::simcall([process, data] { process->set_user_data(data); });
}
double HostEnergy::get_consumed_energy()
{
if (last_updated_ < surf_get_clock()) // We need to simcall this as it modifies the environment
- simgrid::simix::simcall(std::bind(&HostEnergy::update, this));
+ simgrid::kernel::actor::simcall(std::bind(&HostEnergy::update, this));
return total_energy_;
}
*/
void sg_host_energy_update_all()
{
- simgrid::simix::simcall([]() {
+ simgrid::kernel::actor::simcall([]() {
std::vector<simgrid::s4u::Host*> list = simgrid::s4u::Engine::get_instance()->get_all_hosts();
for (auto const& host : list)
if (dynamic_cast<simgrid::s4u::VirtualMachine*>(host) == nullptr) { // Ignore virtual machines
double LinkEnergy::get_consumed_energy()
{
if (last_updated_ < surf_get_clock()) // We need to simcall this as it modifies the environment
- simgrid::simix::simcall(std::bind(&LinkEnergy::update, this));
+ simgrid::kernel::actor::simcall(std::bind(&LinkEnergy::update, this));
return this->total_energy_;
}
} // namespace plugin
{
on_start(*this);
- simgrid::simix::simcall([this]() {
+ simgrid::kernel::actor::simcall([this]() {
simgrid::vm::VmHostExt::ensureVmExtInstalled();
simgrid::s4u::Host* pm = this->pimpl_vm_->get_physical_host();
{
on_suspend(*this);
smx_actor_t issuer = SIMIX_process_self();
- simgrid::simix::simcall([this, issuer]() { pimpl_vm_->suspend(issuer); });
+ simgrid::kernel::actor::simcall([this, issuer]() { pimpl_vm_->suspend(issuer); });
}
void VirtualMachine::resume()
void VirtualMachine::shutdown()
{
smx_actor_t issuer = SIMIX_process_self();
- simgrid::simix::simcall([this, issuer]() { pimpl_vm_->shutdown(issuer); });
+ simgrid::kernel::actor::simcall([this, issuer]() { pimpl_vm_->shutdown(issuer); });
on_shutdown(*this);
}
void VirtualMachine::set_pm(simgrid::s4u::Host* pm)
{
- simgrid::simix::simcall([this, pm]() { pimpl_vm_->set_physical_host(pm); });
+ simgrid::kernel::actor::simcall([this, pm]() { pimpl_vm_->set_physical_host(pm); });
}
VirtualMachine::state VirtualMachine::get_state()
{
- return simgrid::simix::simcall([this]() { return pimpl_vm_->get_state(); });
+ return simgrid::kernel::actor::simcall([this]() { return pimpl_vm_->get_state(); });
}
size_t VirtualMachine::get_ramsize()
*/
void VirtualMachine::set_bound(double bound)
{
- simgrid::simix::simcall([this, bound]() { pimpl_vm_->set_bound(bound); });
+ simgrid::kernel::actor::simcall([this, bound]() { pimpl_vm_->set_bound(bound); });
}
} // namespace simgrid
ActorPtr Actor::init(const std::string& name, s4u::Host* host)
{
smx_actor_t self = SIMIX_process_self();
- kernel::actor::ActorImpl* actor = simix::simcall([self, &name, host] { return self->init(name, host).get(); });
+ kernel::actor::ActorImpl* actor =
+ kernel::actor::simcall([self, &name, host] { return self->init(name, host).get(); });
return actor->iface();
}
ActorPtr Actor::start(const std::function<void()>& code)
{
- simgrid::simix::simcall([this, &code] { pimpl_->start(code); });
+ simgrid::kernel::actor::simcall([this, &code] { pimpl_->start(code); });
return this;
}
{
smx_actor_t self = SIMIX_process_self();
kernel::actor::ActorImpl* actor =
- simix::simcall([self, &name, host, &code] { return self->init(name, host)->start(code); });
+ kernel::actor::simcall([self, &name, host, &code] { return self->init(name, host)->start(code); });
return actor->iface();
}
{
auto issuer = SIMIX_process_self();
auto target = pimpl_;
- simix::simcall_blocking([issuer, target, timeout] {
+ kernel::actor::simcall_blocking([issuer, target, timeout] {
if (target->finished_) {
// The joined process is already finished, just wake up the issuer right away
issuer->simcall_answer();
void Actor::set_auto_restart(bool autorestart)
{
- simix::simcall([this, autorestart]() {
+ kernel::actor::simcall([this, autorestart]() {
xbt_assert(autorestart && not pimpl_->has_to_auto_restart()); // FIXME: handle all cases
pimpl_->set_auto_restart(autorestart);
void Actor::on_exit(const std::function<void(bool /*failed*/)>& fun) const
{
- simix::simcall([this, &fun] { SIMIX_process_on_exit(pimpl_, fun); });
+ kernel::actor::simcall([this, &fun] { SIMIX_process_on_exit(pimpl_, fun); });
}
void Actor::migrate(Host* new_host)
{
s4u::Actor::on_migration_start(*this);
- simix::simcall([this, new_host]() {
+ kernel::actor::simcall([this, new_host]() {
if (pimpl_->waiting_synchro != nullptr) {
// The actor is blocked on an activity. If it's an exec, migrate it too.
// FIXME: implement the migration of other kind of activities
void Actor::daemonize()
{
- simix::simcall([this]() { pimpl_->daemonize(); });
+ kernel::actor::simcall([this]() { pimpl_->daemonize(); });
}
bool Actor::is_daemon() const
auto issuer = SIMIX_process_self();
auto target = pimpl_;
s4u::Actor::on_suspend(*this);
- simix::simcall_blocking([issuer, target]() {
+ kernel::actor::simcall_blocking([issuer, target]() {
target->suspend(issuer);
if (target != issuer) {
/* If we are suspending ourselves, then just do not finish the simcall now */
void Actor::resume()
{
- simix::simcall([this] { pimpl_->resume(); });
+ kernel::actor::simcall([this] { pimpl_->resume(); });
s4u::Actor::on_resume(*this);
}
void Actor::set_kill_time(double kill_time)
{
- simix::simcall([this, kill_time] { pimpl_->set_kill_time(kill_time); });
+ kernel::actor::simcall([this, kill_time] { pimpl_->set_kill_time(kill_time); });
}
/** @brief Get the kill time of an actor(or 0 if unset). */
kernel::actor::ActorImpl* killer = SIMIX_process_self();
kernel::actor::ActorImpl* victim = SIMIX_process_from_PID(pid);
if (victim != nullptr) {
- simix::simcall([killer, victim] { killer->kill(victim); });
+ kernel::actor::simcall([killer, victim] { killer->kill(victim); });
} else {
std::ostringstream oss;
oss << "kill: (" << pid << ") - No such actor" << std::endl;
void Actor::kill()
{
kernel::actor::ActorImpl* process = SIMIX_process_self();
- simix::simcall([this, process] {
+ kernel::actor::simcall([this, process] {
xbt_assert(pimpl_ != simix_global->maestro_process, "Killing maestro is a rather bad idea");
process->kill(pimpl_);
});
void Actor::kill_all()
{
kernel::actor::ActorImpl* self = SIMIX_process_self();
- simix::simcall([self] { self->kill_all(); });
+ kernel::actor::simcall([self] { self->kill_all(); });
}
const std::unordered_map<std::string, std::string>* Actor::get_properties() const
void Actor::set_property(const std::string& key, const std::string& value)
{
- simix::simcall([this, &key, &value] { pimpl_->set_property(key, value); });
+ kernel::actor::simcall([this, &key, &value] { pimpl_->set_property(key, value); });
}
Actor* Actor::restart()
{
- return simix::simcall([this]() { return pimpl_->restart(); });
+ return kernel::actor::simcall([this]() { return pimpl_->restart(); });
}
// ***** this_actor *****
kernel::actor::ActorImpl* issuer = SIMIX_process_self();
Actor::on_sleep(*issuer->ciface());
- simix::simcall_blocking([issuer, duration]() {
+ kernel::actor::simcall_blocking([issuer, duration]() {
if (MC_is_active() || MC_record_replay_is_active()) {
MC_process_clock_add(issuer, duration);
issuer->simcall_answer();
void yield()
{
- simix::simcall([] { /* do nothing*/ });
+ kernel::actor::simcall([] { /* do nothing*/ });
}
XBT_PUBLIC void sleep_until(double wakeup_time)
void resume()
{
kernel::actor::ActorImpl* self = SIMIX_process_self();
- simix::simcall([self] { self->resume(); });
+ kernel::actor::simcall([self] { self->resume(); });
Actor::on_resume(*self->ciface());
}
void exit()
{
kernel::actor::ActorImpl* self = SIMIX_process_self();
- simgrid::simix::simcall([self] { self->exit(); });
+ simgrid::kernel::actor::simcall([self] { self->exit(); });
}
void on_exit(const std::function<void(bool)>& fun)
Comm* Comm::cancel()
{
- simix::simcall([this] {
+ kernel::actor::simcall([this] {
if (pimpl_)
boost::static_pointer_cast<kernel::activity::CommImpl>(pimpl_)->cancel();
});
ConditionVariablePtr ConditionVariable::create()
{
kernel::activity::ConditionVariableImpl* cond =
- simix::simcall([] { return new kernel::activity::ConditionVariableImpl(); });
+ kernel::actor::simcall([] { return new kernel::activity::ConditionVariableImpl(); });
return ConditionVariablePtr(&cond->cond_, false);
}
*/
void ConditionVariable::notify_one()
{
- simgrid::simix::simcall([this]() { cond_->signal(); });
+ simgrid::kernel::actor::simcall([this]() { cond_->signal(); });
}
void ConditionVariable::notify_all()
{
- simgrid::simix::simcall([this]() { cond_->broadcast(); });
+ simgrid::kernel::actor::simcall([this]() { cond_->broadcast(); });
}
void intrusive_ptr_add_ref(ConditionVariable* cond)
sg_cond_t sg_cond_init()
{
simgrid::kernel::activity::ConditionVariableImpl* cond =
- simgrid::simix::simcall([] { return new simgrid::kernel::activity::ConditionVariableImpl(); });
+ simgrid::kernel::actor::simcall([] { return new simgrid::kernel::activity::ConditionVariableImpl(); });
return new simgrid::s4u::ConditionVariable(cond);
}
/** @brief Register a new netpoint to the system */
void Engine::netpoint_register(kernel::routing::NetPoint* point)
{
- // simgrid::simix::simcall([&]{ FIXME: this segfaults in set_thread
+ // simgrid::kernel::actor::simcall([&]{ FIXME: this segfaults in set_thread
pimpl->netpoints_[point->get_name()] = point;
// });
}
/** @brief Unregister a given netpoint */
void Engine::netpoint_unregister(kernel::routing::NetPoint* point)
{
- simix::simcall([this, point] {
+ kernel::actor::simcall([this, point] {
pimpl->netpoints_.erase(point->get_name());
delete point;
});
Exec* Exec::cancel()
{
- simix::simcall([this] { boost::static_pointer_cast<kernel::activity::ExecImpl>(pimpl_)->cancel(); });
+ kernel::actor::simcall([this] { boost::static_pointer_cast<kernel::activity::ExecImpl>(pimpl_)->cancel(); });
state_ = State::CANCELED;
return this;
}
Exec* ExecSeq::start()
{
- simix::simcall([this] {
+ kernel::actor::simcall([this] {
(*boost::static_pointer_cast<kernel::activity::ExecImpl>(pimpl_))
.set_name(name_)
.set_tracing_category(tracing_category_)
/** @brief Returns the amount of flops that remain to be done */
double ExecSeq::get_remaining()
{
- return simgrid::simix::simcall(
+ return simgrid::kernel::actor::simcall(
[this]() { return boost::static_pointer_cast<simgrid::kernel::activity::ExecImpl>(pimpl_)->get_remaining(); });
}
*/
double ExecSeq::get_remaining_ratio()
{
- return simgrid::simix::simcall([this]() {
+ return simgrid::kernel::actor::simcall([this]() {
return boost::static_pointer_cast<simgrid::kernel::activity::ExecImpl>(pimpl_)->get_seq_remaining_ratio();
});
}
Exec* ExecPar::start()
{
- simix::simcall([this] {
+ kernel::actor::simcall([this] {
(*boost::static_pointer_cast<kernel::activity::ExecImpl>(pimpl_))
.set_hosts(hosts_)
.set_timeout(timeout_)
double ExecPar::get_remaining_ratio()
{
- return simix::simcall(
+ return kernel::actor::simcall(
[this]() { return boost::static_pointer_cast<kernel::activity::ExecImpl>(pimpl_)->get_par_remaining_ratio(); });
}
void Host::turn_on()
{
if (not is_on()) {
- simix::simcall([this] {
+ kernel::actor::simcall([this] {
this->pimpl_cpu->turn_on();
this->pimpl_->turn_on();
on_state_change(*this);
void Host::turn_off()
{
if (is_on()) {
- simix::simcall([this] {
+ kernel::actor::simcall([this] {
for (VirtualMachine* const& vm : vm::VirtualMachineImpl::allVms_)
if (vm->get_pm() == this) {
vm->shutdown();
void Host::set_property(const std::string& key, const std::string& value)
{
- simix::simcall([this, &key, &value] { this->pimpl_->set_property(key, value); });
+ kernel::actor::simcall([this, &key, &value] { this->pimpl_->set_property(key, value); });
}
void Host::set_properties(const std::map<std::string, std::string>& properties)
{
- simix::simcall([this, &properties] { this->pimpl_->set_properties(properties); });
+ kernel::actor::simcall([this, &properties] { this->pimpl_->set_properties(properties); });
}
/** Specify a profile turning the host on and off according to a exhaustive list or a stochastic law.
* The profile must contain boolean values. */
void Host::set_state_profile(kernel::profile::Profile* p)
{
- return simix::simcall([this, p] { pimpl_cpu->set_state_profile(p); });
+ return kernel::actor::simcall([this, p] { pimpl_cpu->set_state_profile(p); });
}
/** Specify a profile modeling the external load according to a exhaustive list or a stochastic law.
*
*/
void Host::set_speed_profile(kernel::profile::Profile* p)
{
- return simix::simcall([this, p] { pimpl_cpu->set_speed_profile(p); });
+ return kernel::actor::simcall([this, p] { pimpl_cpu->set_speed_profile(p); });
}
/** @brief Get the peak processor speed (in flops/s), at the specified pstate */
/** @brief Set the pstate at which the host should run */
void Host::set_pstate(int pstate_index)
{
- simix::simcall([this, pstate_index] { this->pimpl_cpu->set_pstate(pstate_index); });
+ kernel::actor::simcall([this, pstate_index] { this->pimpl_cpu->set_pstate(pstate_index); });
}
/** @brief Retrieve the pstate at which the host is currently running */
int Host::get_pstate() const
*/
std::vector<const char*> Host::get_attached_storages() const
{
- return simix::simcall([this] { return this->pimpl_->get_attached_storages(); });
+ return kernel::actor::simcall([this] { return this->pimpl_->get_attached_storages(); });
}
std::unordered_map<std::string, Storage*> const& Host::get_mounted_storages()
Io* Io::start()
{
- simix::simcall([this] {
+ kernel::actor::simcall([this] {
(*boost::static_pointer_cast<kernel::activity::IoImpl>(pimpl_))
.set_name(name_)
.set_storage(storage_->get_impl())
Io* Io::cancel()
{
- simgrid::simix::simcall([this] { boost::static_pointer_cast<kernel::activity::IoImpl>(pimpl_)->cancel(); });
+ simgrid::kernel::actor::simcall([this] { boost::static_pointer_cast<kernel::activity::IoImpl>(pimpl_)->cancel(); });
state_ = State::CANCELED;
return this;
}
/** @brief Returns the amount of flops that remain to be done */
double Io::get_remaining()
{
- return simix::simcall(
+ return kernel::actor::simcall(
[this]() { return boost::static_pointer_cast<kernel::activity::IoImpl>(pimpl_)->get_remaining(); });
}
sg_size_t Io::get_performed_ioops()
{
- return simix::simcall(
+ return kernel::actor::simcall(
[this]() { return boost::static_pointer_cast<kernel::activity::IoImpl>(pimpl_)->get_performed_ioops(); });
}
void Link::turn_on()
{
- simgrid::simix::simcall([this]() { this->pimpl_->turn_on(); });
+ simgrid::kernel::actor::simcall([this]() { this->pimpl_->turn_on(); });
}
void Link::turn_off()
{
- simgrid::simix::simcall([this]() { this->pimpl_->turn_off(); });
+ simgrid::kernel::actor::simcall([this]() { this->pimpl_->turn_off(); });
}
bool Link::is_on() const
}
void Link::set_data(void* d)
{
- simgrid::simix::simcall([this, d]() { this->pimpl_->set_data(d); });
+ simgrid::kernel::actor::simcall([this, d]() { this->pimpl_->set_data(d); });
}
void Link::set_state_profile(kernel::profile::Profile* profile)
{
- simgrid::simix::simcall([this, profile]() { this->pimpl_->set_state_profile(profile); });
+ simgrid::kernel::actor::simcall([this, profile]() { this->pimpl_->set_state_profile(profile); });
}
void Link::set_bandwidth_profile(kernel::profile::Profile* profile)
{
- simgrid::simix::simcall([this, profile]() { this->pimpl_->set_bandwidth_profile(profile); });
+ simgrid::kernel::actor::simcall([this, profile]() { this->pimpl_->set_bandwidth_profile(profile); });
}
void Link::set_latency_profile(kernel::profile::Profile* trace)
{
- simgrid::simix::simcall([this, trace]() { this->pimpl_->set_latency_profile(trace); });
+ simgrid::kernel::actor::simcall([this, trace]() { this->pimpl_->set_latency_profile(trace); });
}
const char* Link::get_property(const std::string& key) const
}
void Link::set_property(const std::string& key, const std::string& value)
{
- simgrid::simix::simcall([this, &key, &value] { this->pimpl_->set_property(key, value); });
+ simgrid::kernel::actor::simcall([this, &key, &value] { this->pimpl_->set_property(key, value); });
}
} // namespace s4u
} // namespace simgrid
{
kernel::activity::MailboxImpl* mbox = kernel::activity::MailboxImpl::by_name_or_null(name);
if (mbox == nullptr) {
- mbox = simix::simcall([&name] { return kernel::activity::MailboxImpl::by_name_or_create(name); });
+ mbox = kernel::actor::simcall([&name] { return kernel::activity::MailboxImpl::by_name_or_create(name); });
}
return &mbox->piface_;
}
void Mailbox::set_receiver(ActorPtr actor)
{
- simix::simcall([this, actor]() { this->pimpl_->set_receiver(actor); });
+ kernel::actor::simcall([this, actor]() { this->pimpl_->set_receiver(actor); });
}
/** @brief get the receiver (process associated to the mailbox) */
smx_activity_t Mailbox::iprobe(int type, int (*match_fun)(void*, void*, kernel::activity::CommImpl*), void* data)
{
- return simix::simcall([this, type, match_fun, data] { return pimpl_->iprobe(type, match_fun, data); });
+ return kernel::actor::simcall([this, type, match_fun, data] { return pimpl_->iprobe(type, match_fun, data); });
}
} // namespace s4u
} // namespace simgrid
*/
MutexPtr Mutex::create()
{
- kernel::activity::MutexImpl* mutex = simix::simcall([] { return new kernel::activity::MutexImpl(); });
+ kernel::activity::MutexImpl* mutex = kernel::actor::simcall([] { return new kernel::activity::MutexImpl(); });
return MutexPtr(&mutex->mutex(), false);
}
sg_mutex_t sg_mutex_init()
{
simgrid::kernel::activity::MutexImpl* mutex =
- simgrid::simix::simcall([] { return new simgrid::kernel::activity::MutexImpl(); });
+ simgrid::kernel::actor::simcall([] { return new simgrid::kernel::activity::MutexImpl(); });
return new simgrid::s4u::Mutex(mutex);
}
void NetZone::set_property(const std::string& key, const std::string& value)
{
- simix::simcall([this, &key, &value] { properties_[key] = value; });
+ kernel::actor::simcall([this, &key, &value] { properties_[key] = value; });
}
/** @brief Returns the list of direct children (no grand-children) */
Semaphore::Semaphore(unsigned int initial_capacity)
{
- sem_ = simix::simcall([initial_capacity] { return new kernel::activity::SemaphoreImpl(initial_capacity); });
+ sem_ = kernel::actor::simcall([initial_capacity] { return new kernel::activity::SemaphoreImpl(initial_capacity); });
}
Semaphore::~Semaphore()
void Semaphore::release()
{
- simix::simcall([this] { sem_->release(); });
+ kernel::actor::simcall([this] { sem_->release(); });
}
int Semaphore::get_capacity()
{
- return simix::simcall([this] { return sem_->get_capacity(); });
+ return kernel::actor::simcall([this] { return sem_->get_capacity(); });
}
int Semaphore::would_block()
{
- return simix::simcall([this] { return sem_->would_block(); });
+ return kernel::actor::simcall([this] { return sem_->would_block(); });
}
void intrusive_ptr_add_ref(Semaphore* sem)
void Storage::set_property(const std::string& key, const std::string& value)
{
- simix::simcall([this, &key, &value] { this->pimpl_->set_property(key, value); });
+ kernel::actor::simcall([this, &key, &value] { this->pimpl_->set_property(key, value); });
}
IoPtr Storage::io_init(sg_size_t size, Io::OpType type)
{
xbt_assert(mbox, "No rendez-vous point defined for iprobe");
- return simgrid::simix::simcall([mbox, type, match_fun, data] { return mbox->iprobe(type, match_fun, data); });
+ return simgrid::kernel::actor::simcall([mbox, type, match_fun, data] { return mbox->iprobe(type, match_fun, data); });
}
/**
// get there before the initialization
xbt_abort();
}
- return simgrid::simix::simcall([] { return new simgrid::kernel::activity::MutexImpl(); });
+ return simgrid::kernel::actor::simcall([] { return new simgrid::kernel::activity::MutexImpl(); });
}
/**
*/
smx_cond_t simcall_cond_init()
{
- return simgrid::simix::simcall([] { return new simgrid::kernel::activity::ConditionVariableImpl(); });
+ return simgrid::kernel::actor::simcall([] { return new simgrid::kernel::activity::ConditionVariableImpl(); });
}
/**
/* ****************************DEPRECATED CALLS******************************* */
void simcall_process_set_kill_time(smx_actor_t process, double kill_time)
{
- simgrid::simix::simcall([process, kill_time] { process->set_kill_time(kill_time); });
+ simgrid::kernel::actor::simcall([process, kill_time] { process->set_kill_time(kill_time); });
}
void simcall_comm_cancel(smx_activity_t comm)
{
- simgrid::simix::simcall([comm] { boost::static_pointer_cast<simgrid::kernel::activity::CommImpl>(comm)->cancel(); });
+ simgrid::kernel::actor::simcall(
+ [comm] { boost::static_pointer_cast<simgrid::kernel::activity::CommImpl>(comm)->cancel(); });
}
void simcall_execution_cancel(smx_activity_t exec)
{
- simgrid::simix::simcall([exec] { boost::static_pointer_cast<simgrid::kernel::activity::ExecImpl>(exec)->cancel(); });
+ simgrid::kernel::actor::simcall(
+ [exec] { boost::static_pointer_cast<simgrid::kernel::activity::ExecImpl>(exec)->cancel(); });
}
void simcall_execution_set_bound(smx_activity_t exec, double bound)
{
- simgrid::simix::simcall(
+ simgrid::kernel::actor::simcall(
[exec, bound] { boost::static_pointer_cast<simgrid::kernel::activity::ExecImpl>(exec)->set_bound(bound); });
}
smx_activity_t simcall_execution_start(const std::string& name, const std::string& category, double flops_amount,
double sharing_penalty, double bound, sg_host_t host)
{
- return simgrid::simix::simcall([name, category, flops_amount, sharing_penalty, bound, host] {
+ return simgrid::kernel::actor::simcall([name, category, flops_amount, sharing_penalty, bound, host] {
simgrid::kernel::activity::ExecImpl* exec = new simgrid::kernel::activity::ExecImpl();
(*exec)
.set_name(name)
flops_parallel_amount = std::vector<double>(flops_amount, flops_amount + host_nb);
if (bytes_amount != nullptr)
bytes_parallel_amount = std::vector<double>(bytes_amount, bytes_amount + host_nb * host_nb);
- return simgrid::simix::simcall([name, hosts, flops_parallel_amount, bytes_parallel_amount, timeout] {
+ return simgrid::kernel::actor::simcall([name, hosts, flops_parallel_amount, bytes_parallel_amount, timeout] {
simgrid::kernel::activity::ExecImpl* exec = new simgrid::kernel::activity::ExecImpl();
(*exec)
.set_name(name)
smpi_bench_end();
// FIXME: should kill all processes in comm instead
smx_actor_t actor = SIMIX_process_self();
- simgrid::simix::simcall([actor] { actor->exit(); });
+ simgrid::kernel::actor::simcall([actor] { actor->exit(); });
return MPI_SUCCESS;
}
{
// Test the simple immediate execution:
XBT_INFO("Start");
- simgrid::simix::simcall([] { XBT_INFO("kernel"); });
+ simgrid::kernel::actor::simcall([] { XBT_INFO("kernel"); });
XBT_INFO("kernel, returned");
// Synchronize on a successful Future<void>: