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
Implement the RandomTransition
[simgrid.git]
/
src
/
kernel
/
actor
/
SimcallObserver.cpp
diff --git
a/src/kernel/actor/SimcallObserver.cpp
b/src/kernel/actor/SimcallObserver.cpp
index
bb1dada
..
9a479e9
100644
(file)
--- a/
src/kernel/actor/SimcallObserver.cpp
+++ b/
src/kernel/actor/SimcallObserver.cpp
@@
-28,6
+28,15
@@
bool RandomSimcall::depends(SimcallObserver* other)
{
return get_issuer() == other->get_issuer();
}
+void RandomSimcall::serialize(Simcall& type, char* buffer)
+{
+ type = Simcall::RANDOM;
+ std::stringstream stream;
+
+ stream << min_ << ' ' << max_;
+ strcpy(buffer, stream.str().c_str());
+}
+
bool MutexSimcall::depends(SimcallObserver* other)
{
if (dynamic_cast<RandomSimcall*>(other) != nullptr)