Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use type aid_t for an actor's PID.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 23 Feb 2023 14:58:28 +0000 (15:58 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 23 Feb 2023 15:19:00 +0000 (16:19 +0100)
include/simgrid/Exception.hpp
src/xbt/exception.cpp

index 5747ce1..ca94f51 100644 (file)
@@ -32,7 +32,7 @@ class ThrowPoint {
 public:
   ThrowPoint() = default;
   explicit ThrowPoint(const char* file, int line, const char* function, Backtrace&& bt, std::string&& actor_name,
-                      int pid)
+                      aid_t pid)
       : file_(file)
       , line_(line)
       , function_(function)
@@ -47,7 +47,7 @@ public:
   const char* function_ = nullptr;
   Backtrace backtrace_;
   std::string procname_ = ""; /**< Name of the process who thrown this */
-  int pid_              = 0;  /**< PID of the process who thrown this */
+  aid_t pid_            = 0;  /**< PID of the process who thrown this */
 };
 
 /** Create a ThrowPoint with (__FILE__, __LINE__, __func__) */
index 51e9649..e8048f8 100644 (file)
@@ -37,7 +37,7 @@ void log_exception(e_xbt_log_priority_t prio, const char* context, std::exceptio
 
     auto* with_context = dynamic_cast<const simgrid::Exception*>(&exception);
     if (with_context != nullptr) {
-      XBT_LOG(prio, "%s %s by %s/%d: %s", context, name.c_str(), with_context->throw_point().procname_.c_str(),
+      XBT_LOG(prio, "%s %s by %s/%ld: %s", context, name.c_str(), with_context->throw_point().procname_.c_str(),
               with_context->throw_point().pid_, exception.what());
       // Do we have a backtrace?
       if (not simgrid::config::get_value<bool>("exception/cutpath")) {