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
CommWaitTransition mailbox is now valid
[simgrid.git]
/
src
/
kernel
/
activity
/
CommImpl.hpp
diff --git
a/src/kernel/activity/CommImpl.hpp
b/src/kernel/activity/CommImpl.hpp
index 475eda9a04d8bd9849985f39d937b9e77a9ea1bb..3837b6b28f45177f8f32f56f63dc767a6e61a1d4 100644
(file)
--- a/
src/kernel/activity/CommImpl.hpp
+++ b/
src/kernel/activity/CommImpl.hpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2007-202
1
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-202
2
. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
@@
-8,8
+8,7
@@
#include "src/kernel/activity/ActivityImpl.hpp"
#include "src/kernel/actor/ActorImpl.hpp"
#include "src/kernel/activity/ActivityImpl.hpp"
#include "src/kernel/actor/ActorImpl.hpp"
-#include "surf/surf.hpp"
-
+#include "src/kernel/actor/SimcallObserver.hpp"
namespace simgrid {
namespace kernel {
namespace simgrid {
namespace kernel {
@@
-25,7
+24,9
@@
class XBT_PUBLIC CommImpl : public ActivityImpl_T<CommImpl> {
double size_ = 0.0;
bool detached_ = false; /* If detached or not */
bool copied_ = false; /* whether the data were already copied */
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 */
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 */
@@
-46,13
+47,17
@@
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_; }
bool detached() const { return detached_; }
bool detached() const { return detached_; }
+ std::vector<s4u::Link*> get_traversed_links() const;
void copy_data();
void copy_data();
- bool test() override;
+ 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;
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();
static void wait_any_for(actor::ActorImpl* issuer, const std::vector<CommImpl*>& comms, double timeout);
CommImpl* start();
@@
-60,6
+65,7
@@
public:
void resume() override;
void cancel() override;
void post() override;
void resume() override;
void cancel() override;
void post() override;
+ void set_exception(actor::ActorImpl* issuer) override;
void finish() override;
const Type type_ = Type::SEND; /* Type of the communication (SEND or RECEIVE) */
void finish() override;
const Type type_ = Type::SEND; /* Type of the communication (SEND or RECEIVE) */
@@
-90,6
+96,8
@@
expectations of the other side, too. See */
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 activity
} // namespace kernel
};
} // namespace activity
} // namespace kernel