]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/activity/CommImpl.hpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
CPU factors: dynamic factors for CPU
[simgrid.git] / src / kernel / activity / CommImpl.hpp
index 54ca57aa18ecd48667870e5394e8b4a81262b027..475eda9a04d8bd9849985f39d937b9e77a9ea1bb 100644 (file)
@@ -19,6 +19,8 @@ class XBT_PUBLIC CommImpl : public ActivityImpl_T<CommImpl> {
   ~CommImpl() override;
   void cleanup_surf();
 
+  static void (*copy_data_callback_)(CommImpl*, void*, size_t);
+
   double rate_       = 0.0;
   double size_       = 0.0;
   bool detached_     = false;   /* If detached or not */
@@ -30,6 +32,8 @@ class XBT_PUBLIC CommImpl : public ActivityImpl_T<CommImpl> {
 public:
   enum class Type { SEND, RECEIVE };
 
+  static void set_copy_data_callback(void (*callback)(CommImpl*, void*, size_t));
+
   explicit CommImpl(Type type) : type_(type) {}
   CommImpl(s4u::Host* from, s4u::Host* to, double bytes);
 
@@ -46,6 +50,11 @@ public:
 
   void copy_data();
 
+  bool test() override;
+  void wait_for(actor::ActorImpl* issuer, double timeout) override;
+  static ssize_t test_any(const actor::ActorImpl* issuer, const std::vector<CommImpl*>& comms);
+  static void wait_any_for(actor::ActorImpl* issuer, const std::vector<CommImpl*>& comms, double timeout);
+
   CommImpl* start();
   void suspend() override;
   void resume() override;