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
add missing '&' causing temporary value to be modified
[simgrid.git]
/
src
/
s4u
/
s4u_Activity.cpp
diff --git
a/src/s4u/s4u_Activity.cpp
b/src/s4u/s4u_Activity.cpp
index dcc650de452460761b4b814d76a348e01305b9c2..7b38f61bb2b3cb77431865390b119e89e9e870b8 100644
(file)
--- a/
src/s4u/s4u_Activity.cpp
+++ b/
src/s4u/s4u_Activity.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2006-202
2
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-202
3
. 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. */
@@
-25,7
+25,9
@@
template class xbt::Extendable<s4u::Activity>;
namespace s4u {
xbt::signal<void(Activity&)> Activity::on_veto;
namespace s4u {
xbt::signal<void(Activity&)> Activity::on_veto;
-xbt::signal<void(Activity&)> Activity::on_completion;
+xbt::signal<void(Activity const&)> Activity::on_completion;
+xbt::signal<void(Activity const&)> Activity::on_suspended;
+xbt::signal<void(Activity const&)> Activity::on_resumed;
std::set<Activity*>* Activity::vetoed_activities_ = nullptr;
std::set<Activity*>* Activity::vetoed_activities_ = nullptr;
@@
-50,7
+52,7
@@
void Activity::wait_until(double time_limit)
Activity* Activity::wait_for(double timeout)
{
if (state_ == State::INITED)
Activity* Activity::wait_for(double timeout)
{
if (state_ == State::INITED)
-
vetoable_
start();
+ start();
if (state_ == State::FAILED) {
if (dynamic_cast<Comm*>(this))
if (state_ == State::FAILED) {
if (dynamic_cast<Comm*>(this))
@@
-80,7
+82,7
@@
bool Activity::test()
return true;
if (state_ == State::INITED || state_ == State::STARTING)
return true;
if (state_ == State::INITED || state_ == State::STARTING)
- this->
vetoable_
start();
+ this->start();
kernel::actor::ActorImpl* issuer = kernel::actor::ActorImpl::self();
kernel::actor::ActivityTestSimcall observer{issuer, pimpl_.get()};
kernel::actor::ActorImpl* issuer = kernel::actor::ActorImpl::self();
kernel::actor::ActivityTestSimcall observer{issuer, pimpl_.get()};