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
replace SIMIX_process_auto_restart_set() with ActorImpl::set_auto_restart()
[simgrid.git]
/
src
/
s4u
/
s4u_Actor.cpp
diff --git
a/src/s4u/s4u_Actor.cpp
b/src/s4u/s4u_Actor.cpp
index
940243c
..
220675b
100644
(file)
--- a/
src/s4u/s4u_Actor.cpp
+++ b/
src/s4u/s4u_Actor.cpp
@@
-71,7
+71,7
@@
void Actor::join(double timeout)
void Actor::set_auto_restart(bool autorestart)
{
void Actor::set_auto_restart(bool autorestart)
{
- simgrid::simix::simcall([this, autorestart]() { pimpl_->
auto_restart = autorestart
; });
+ simgrid::simix::simcall([this, autorestart]() { pimpl_->
set_auto_restart(autorestart)
; });
}
void Actor::on_exit(int_f_pvoid_pvoid_t fun, void* data) /* deprecated */
}
void Actor::on_exit(int_f_pvoid_pvoid_t fun, void* data) /* deprecated */
@@
-114,7
+114,7
@@
void Actor::migrate(Host* new_host)
s4u::Host* Actor::get_host()
{
s4u::Host* Actor::get_host()
{
- return this->pimpl_->host;
+ return this->pimpl_->host
_
;
}
void Actor::daemonize()
}
void Actor::daemonize()
@@
-124,7
+124,7
@@
void Actor::daemonize()
bool Actor::is_daemon() const
{
bool Actor::is_daemon() const
{
- return this->pimpl_->is
D
aemon();
+ return this->pimpl_->is
_d
aemon();
}
const simgrid::xbt::string& Actor::get_name() const
}
const simgrid::xbt::string& Actor::get_name() const
@@
-139,12
+139,12
@@
const char* Actor::get_cname() const
aid_t Actor::get_pid() const
{
aid_t Actor::get_pid() const
{
- return this->pimpl_->pid;
+ return this->pimpl_->pid
_
;
}
aid_t Actor::get_ppid() const
{
}
aid_t Actor::get_ppid() const
{
- return this->pimpl_->ppid;
+ return this->pimpl_->ppid
_
;
}
void Actor::suspend()
}
void Actor::suspend()
@@
-159,9
+159,9
@@
void Actor::resume()
s4u::Actor::on_resume(this);
}
s4u::Actor::on_resume(this);
}
-
int
Actor::is_suspended()
+
bool
Actor::is_suspended()
{
{
- return simgrid::simix::simcall([this] { return pimpl_->suspended; });
+ return simgrid::simix::simcall([this] { return pimpl_->suspended
_
; });
}
void Actor::set_kill_time(double time)
}
void Actor::set_kill_time(double time)
@@
-217,7
+217,7
@@
void Actor::kill_all()
simgrid::simix::simcall([&self] { SIMIX_process_killall(self); });
}
simgrid::simix::simcall([&self] { SIMIX_process_killall(self); });
}
-std::map<std::string, std::string>* Actor::get_properties()
+std::
unordered_
map<std::string, std::string>* Actor::get_properties()
{
return simgrid::simix::simcall([this] { return this->pimpl_->get_properties(); });
}
{
return simgrid::simix::simcall([this] { return this->pimpl_->get_properties(); });
}
@@
-321,12
+321,12
@@
ExecPtr exec_async(double flops)
aid_t get_pid()
{
aid_t get_pid()
{
- return SIMIX_process_self()->pid;
+ return SIMIX_process_self()->pid
_
;
}
aid_t get_ppid()
{
}
aid_t get_ppid()
{
- return SIMIX_process_self()->ppid;
+ return SIMIX_process_self()->ppid
_
;
}
std::string get_name()
}
std::string get_name()
@@
-341,7
+341,7
@@
const char* get_cname()
Host* get_host()
{
Host* get_host()
{
- return SIMIX_process_self()->host;
+ return SIMIX_process_self()->host
_
;
}
void suspend()
}
void suspend()
@@
-362,7
+362,7
@@
void resume()
bool is_suspended()
{
smx_actor_t process = SIMIX_process_self();
bool is_suspended()
{
smx_actor_t process = SIMIX_process_self();
- return simgrid::simix::simcall([process] { return process->suspended; });
+ return simgrid::simix::simcall([process] { return process->suspended
_
; });
}
void kill()
}
void kill()
@@
-500,11
+500,11
@@
xbt_dict_t sg_actor_get_properties(sg_actor_t actor)
{
xbt_assert(actor != nullptr, "Invalid parameter: First argument must not be nullptr");
xbt_dict_t as_dict = xbt_dict_new_homogeneous(xbt_free_f);
{
xbt_assert(actor != nullptr, "Invalid parameter: First argument must not be nullptr");
xbt_dict_t as_dict = xbt_dict_new_homogeneous(xbt_free_f);
- std::map<std::string, std::string>* props = actor->get_properties();
+ std::
unordered_
map<std::string, std::string>* props = actor->get_properties();
if (props == nullptr)
return nullptr;
if (props == nullptr)
return nullptr;
- for (auto const&
elm
: *props) {
- xbt_dict_set(as_dict,
elm.first.c_str(), xbt_strdup(elm
.second.c_str()), nullptr);
+ for (auto const&
kv
: *props) {
+ xbt_dict_set(as_dict,
kv.first.c_str(), xbt_strdup(kv
.second.c_str()), nullptr);
}
return as_dict;
}
}
return as_dict;
}