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
Small typos in comments
[simgrid.git]
/
src
/
kernel
/
activity
/
SleepImpl.cpp
diff --git
a/src/kernel/activity/SleepImpl.cpp
b/src/kernel/activity/SleepImpl.cpp
index 0288909a2573f1851430bfac63d7e22d7712ca6c..6a529e8cd6f268717c1b331987731298d4181c3f 100644
(file)
--- a/
src/kernel/activity/SleepImpl.cpp
+++ b/
src/kernel/activity/SleepImpl.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2007-202
2
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-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. */
@@
-27,33
+27,28
@@
SleepImpl& SleepImpl::set_duration(double duration)
SleepImpl* SleepImpl::start()
{
SleepImpl* SleepImpl::start()
{
-
surf
_action_ = host_->get_cpu()->sleep(duration_);
-
surf
_action_->set_activity(this);
+
model
_action_ = host_->get_cpu()->sleep(duration_);
+
model
_action_->set_activity(this);
XBT_DEBUG("Create sleep synchronization %p", this);
return this;
}
XBT_DEBUG("Create sleep synchronization %p", this);
return this;
}
-void SleepImpl::post()
+void SleepImpl::set_exception(actor::ActorImpl* issuer)
+{
+ /* FIXME: Really, nothing bad can happen while we sleep? */
+}
+void SleepImpl::finish()
{
{
- if (
surf
_action_->get_state() == resource::Action::State::FAILED) {
+ if (
model
_action_->get_state() == resource::Action::State::FAILED) {
if (host_ && not host_->is_on())
set_state(State::SRC_HOST_FAILURE);
else
set_state(State::CANCELED);
if (host_ && not host_->is_on())
set_state(State::SRC_HOST_FAILURE);
else
set_state(State::CANCELED);
- } else if (
surf
_action_->get_state() == resource::Action::State::FINISHED) {
+ } else if (
model
_action_->get_state() == resource::Action::State::FINISHED) {
set_state(State::DONE);
}
clean_action();
set_state(State::DONE);
}
clean_action();
- /* Answer all simcalls associated with the synchro */
- finish();
-}
-void SleepImpl::set_exception(actor::ActorImpl* issuer)
-{
- /* FIXME: Really, nothing bad can happen while we sleep? */
-}
-void SleepImpl::finish()
-{
XBT_DEBUG("SleepImpl::finish() in state %s", get_state_str());
while (not simcalls_.empty()) {
const actor::Simcall* simcall = simcalls_.front();
XBT_DEBUG("SleepImpl::finish() in state %s", get_state_str());
while (not simcalls_.empty()) {
const actor::Simcall* simcall = simcalls_.front();