]> AND Public Git Repository - simgrid.git/blobdiff - include/simgrid/s4u/Comm.hpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
implement CRTP in kernel::activity
[simgrid.git] / include / simgrid / s4u / Comm.hpp
index 26e13992efb0fa307e6bc945a5852687696cebe6..d59fc2a8ead764cf3293447033f98c6e168d2450 100644 (file)
@@ -27,8 +27,8 @@ class XBT_PUBLIC Comm : public Activity {
   size_t dst_buff_size_               = 0;
   void* src_buff_                     = nullptr;
   size_t src_buff_size_               = sizeof(void*);
+  std::string tracing_category_       = "";
   std::atomic_int_fast32_t refcount_{0};
-
   /* FIXME: expose these elements in the API */
   int detached_                                                           = 0;
   int (*match_fun_)(void*, void*, kernel::activity::CommImpl*)            = nullptr;
@@ -44,9 +44,9 @@ public:
 
   virtual ~Comm();
 
-  static xbt::signal<void(ActorPtr)> on_sender_start;
-  static xbt::signal<void(ActorPtr)> on_receiver_start;
-  static xbt::signal<void(ActorPtr)> on_completion;
+  static xbt::signal<void(Actor const&)> on_sender_start;
+  static xbt::signal<void(Actor const&)> on_receiver_start;
+  static xbt::signal<void(Actor const&)> on_completion;
 
   /*! take a vector s4u::CommPtr and return when one of them is finished.
    * The return value is the rank of the first finished CommPtr. */
@@ -111,6 +111,8 @@ public:
    * That's a buffer where the sent data will be copied  */
   CommPtr set_dst_data(void** buff, size_t size);
 
+  CommPtr set_tracing_category(const std::string& category);
+
   /** Retrieve the mailbox on which this comm acts */
   Mailbox* get_mailbox();
   /** Retrieve the size of the received data. Not to be mixed with @ref Activity::set_remaining()  */