X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3dd753cd9e46d794e00629d03183250aec4a17e4..f9b13d923d31bb0336aeeaab6d5b7ba33812f3f7:/src/kernel/activity/CommImpl.hpp diff --git a/src/kernel/activity/CommImpl.hpp b/src/kernel/activity/CommImpl.hpp index 5b131f079f..3837b6b28f 100644 --- a/src/kernel/activity/CommImpl.hpp +++ b/src/kernel/activity/CommImpl.hpp @@ -8,6 +8,7 @@ #include "src/kernel/activity/ActivityImpl.hpp" #include "src/kernel/actor/ActorImpl.hpp" +#include "src/kernel/actor/SimcallObserver.hpp" namespace simgrid { namespace kernel { @@ -23,7 +24,9 @@ class XBT_PUBLIC CommImpl : public ActivityImpl_T { double size_ = 0.0; bool detached_ = false; /* If detached or not */ bool copied_ = false; /* whether the data were already copied */ - MailboxImpl* mbox_ = nullptr; /* Rendez-vous where the comm is queued */ + MailboxImpl* mbox_ = nullptr; /* Rendez-vous where the comm is queued. nullptr once the comm is matched with both a + sender and receiver */ + long mbox_id_ = -1; /* ID of the rendez-vous where the comm was first queued (for MC) */ s4u::Host* from_ = nullptr; /* Pre-determined only for direct host-to-host communications */ s4u::Host* to_ = nullptr; /* Otherwise, computed at start() time from the actors */ @@ -44,20 +47,14 @@ public: double get_rate() const { return rate_; } MailboxImpl* get_mailbox() const { return mbox_; } + long get_mailbox_id() const { return mbox_id_; } bool detached() const { return detached_; } std::vector get_traversed_links() const; void copy_data(); - static ActivityImplPtr - isend(actor::ActorImpl* src, MailboxImpl* mbox, double task_size, double rate, unsigned char* src_buff, - size_t src_buff_size, bool (*match_fun)(void*, void*, CommImpl*), - void (*clean_fun)(void*), // used to free the synchro in case of problem after a detached send - void (*copy_data_fun)(CommImpl*, void*, size_t), // used to copy data if not default one - void* data, bool detached); - static ActivityImplPtr irecv(actor::ActorImpl* receiver, MailboxImpl* mbox, unsigned char* dst_buff, - size_t* dst_buff_size, bool (*match_fun)(void*, void*, CommImpl*), - void (*copy_data_fun)(CommImpl*, void*, size_t), void* data, double rate); + static ActivityImplPtr isend(actor::CommIsendSimcall* observer); + static ActivityImplPtr irecv(actor::CommIrecvSimcall* observer); bool test(actor::ActorImpl* issuer) override; void wait_for(actor::ActorImpl* issuer, double timeout) override;