A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move the conditionVariable observer to the right file
[simgrid.git]
/
src
/
kernel
/
activity
/
CommImpl.hpp
diff --git
a/src/kernel/activity/CommImpl.hpp
b/src/kernel/activity/CommImpl.hpp
index 32fef45acff64415147a9fe5017982bff2859059..4f249a4bbf0c9f01ed1b007731c4b48be09bc610 100644
(file)
--- a/
src/kernel/activity/CommImpl.hpp
+++ b/
src/kernel/activity/CommImpl.hpp
@@
-32,6
+32,9
@@
class XBT_PUBLIC CommImpl : public ActivityImpl_T<CommImpl> {
s4u::Host* to_ = nullptr; /* Otherwise, computed at start() time from the actors */
CommImplType type_ = CommImplType::SEND; /* Type of the communication (SEND or RECEIVE) */
s4u::Host* to_ = nullptr; /* Otherwise, computed at start() time from the actors */
CommImplType type_ = CommImplType::SEND; /* Type of the communication (SEND or RECEIVE) */
+ static unsigned next_id_; // Next ID to be given (for MC)
+ const unsigned id_ = ++next_id_; // ID of this comm (for MC) -- 0 as an ID denotes "invalid/unknown comm"
+
public:
CommImpl() = default;
public:
CommImpl() = default;
@@
-52,7
+55,8
@@
public:
double get_rate() const { return rate_; }
MailboxImpl* get_mailbox() const { return mbox_; }
double get_rate() const { return rate_; }
MailboxImpl* get_mailbox() const { return mbox_; }
- long get_mailbox_id() const { return mbox_id_; }
+ unsigned get_mailbox_id() const { return mbox_id_; }
+ unsigned get_id() const { return id_; }
bool is_detached() const { return detached_; }
bool is_assigned() const { return (to_ != nullptr && from_ != nullptr); }
bool is_detached() const { return detached_; }
bool is_assigned() const { return (to_ != nullptr && from_ != nullptr); }
@@
-91,11
+95,10
@@
expectations of the other side, too. See */
unsigned char* dst_buff_ = nullptr;
size_t src_buff_size_ = 0;
size_t* dst_buff_size_ = nullptr;
unsigned char* dst_buff_ = nullptr;
size_t src_buff_size_ = 0;
size_t* dst_buff_size_ = nullptr;
+ void* payload_ = nullptr; // If dst_buff_ is NULL, the default copy callback puts the data here
void* src_data_ = nullptr; /* User data associated to the communication */
void* dst_data_ = nullptr;
void* src_data_ = nullptr; /* User data associated to the communication */
void* dst_data_ = nullptr;
- static xbt::signal<void(CommImpl const&)> on_start;
- static xbt::signal<void(CommImpl const&)> on_completion;
};
} // namespace simgrid::kernel::activity
};
} // namespace simgrid::kernel::activity