X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/dd33438d4578b82a960cade03329ca99f2bbc53a..82af9c443eb39b534153396598f68562ed6eac98:/src/s4u/s4u_actor.cpp diff --git a/src/s4u/s4u_actor.cpp b/src/s4u/s4u_actor.cpp index 96ec0750ef..bbed1a8a8d 100644 --- a/src/s4u/s4u_actor.cpp +++ b/src/s4u/s4u_actor.cpp @@ -77,12 +77,12 @@ simgrid::xbt::string Actor::name() return this->pimpl_->name; } -int Actor::pid() +aid_t Actor::pid() { return this->pimpl_->pid; } -int Actor::ppid() +aid_t Actor::ppid() { return this->pimpl_->ppid; } @@ -111,7 +111,8 @@ double Actor::killTime() return simcall_process_get_kill_time(pimpl_); } -void Actor::kill(int pid) { +void Actor::kill(aid_t pid) +{ smx_actor_t process = SIMIX_process_from_PID(pid); if(process != nullptr) { simcall_process_kill(process); @@ -132,7 +133,7 @@ void Actor::kill() { // ***** Static functions ***** -ActorPtr Actor::byPid(int pid) +ActorPtr Actor::byPid(aid_t pid) { smx_actor_t process = SIMIX_process_from_PID(pid); if (process != nullptr) @@ -209,12 +210,12 @@ Comm& irecv(MailboxPtr chan, void** data) return Comm::recv_async(chan, data); } -int pid() +aid_t pid() { return SIMIX_process_self()->pid; } -int ppid() +aid_t ppid() { return SIMIX_process_self()->ppid; }