Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
introduce type aid_t for Actor's ID (ie, PID)
[simgrid.git] / src / s4u / s4u_actor.cpp
index 96ec075..bbed1a8 100644 (file)
@@ -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;
 }