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
stupid me. try again
[simgrid.git]
/
src
/
simix
/
ActorImpl.cpp
diff --git
a/src/simix/ActorImpl.cpp
b/src/simix/ActorImpl.cpp
index
5d33798
..
c27e6d0
100644
(file)
--- a/
src/simix/ActorImpl.cpp
+++ b/
src/simix/ActorImpl.cpp
@@
-69,7
+69,7
@@
void SIMIX_process_cleanup(smx_actor_t process)
process->kill_timer = nullptr;
}
process->kill_timer = nullptr;
}
-
xbt_os_mutex_acquire(simix_global->mutex
);
+
simix_global->mutex.lock(
);
/* cancel non-blocking communications */
while (not process->comms.empty()) {
/* cancel non-blocking communications */
while (not process->comms.empty()) {
@@
-111,9
+111,9
@@
void SIMIX_process_cleanup(smx_actor_t process)
#endif
simix_global->process_to_destroy.push_back(*process);
}
#endif
simix_global->process_to_destroy.push_back(*process);
}
- process->context_->iwannadie =
0
;
+ process->context_->iwannadie =
false
;
-
xbt_os_mutex_release(simix_global->mutex
);
+
simix_global->mutex.unlock(
);
}
/**
}
/**
@@
-192,7
+192,7
@@
smx_activity_t ActorImpl::suspend(ActorImpl* issuer)
return nullptr;
}
return nullptr;
}
- suspended_ =
1
;
+ suspended_ =
true
;
/* If we are suspending another actor that is waiting on a sync, suspend its synchronization. */
if (this != issuer) {
/* If we are suspending another actor that is waiting on a sync, suspend its synchronization. */
if (this != issuer) {
@@
-202,7
+202,7
@@
smx_activity_t ActorImpl::suspend(ActorImpl* issuer)
return nullptr;
} else {
return nullptr;
} else {
- return SIMIX_execution_start("suspend", 0.0, 1.0, 0.0, this->host_);
+ return SIMIX_execution_start("suspend",
"",
0.0, 1.0, 0.0, this->host_);
}
}
}
}
@@
-217,7
+217,7
@@
void ActorImpl::resume()
if (not suspended_)
return;
if (not suspended_)
return;
- suspended_ =
0
;
+ suspended_ =
false
;
/* resume the synchronization that was blocking the resumed actor. */
if (waiting_synchro)
/* resume the synchronization that was blocking the resumed actor. */
if (waiting_synchro)
@@
-443,9
+443,9
@@
void SIMIX_process_kill(smx_actor_t process, smx_actor_t issuer) {
(issuer->host_ == nullptr ? "(null)" : issuer->host_->get_cname()), process->get_cname(),
process->host_->get_cname());
(issuer->host_ == nullptr ? "(null)" : issuer->host_->get_cname()), process->get_cname(),
process->host_->get_cname());
- process->context_->iwannadie =
1
;
- process->blocked_
= 0
;
- process->suspended_
= 0
;
+ process->context_->iwannadie =
true
;
+ process->blocked_
= false
;
+ process->suspended_
= false
;
process->exception = nullptr;
/* destroy the blocking synchro if any */
process->exception = nullptr;
/* destroy the blocking synchro if any */
@@
-483,7
+483,7
@@
void SIMIX_process_kill(smx_actor_t process, smx_actor_t issuer) {
SIMIX_synchro_stop_waiting(process, &process->simcall);
} else if (io != nullptr) {
SIMIX_synchro_stop_waiting(process, &process->simcall);
} else if (io != nullptr) {
-
SIMIX_io_destroy(process->waiting_synchro
);
+
delete io.get(
);
} else {
xbt_die("Unknown type of activity");
}
} else {
xbt_die("Unknown type of activity");
}
@@
-547,7
+547,7
@@
void SIMIX_process_throw(smx_actor_t process, xbt_errcat_t cat, int value, const
simgrid::kernel::activity::IoImplPtr io =
boost::dynamic_pointer_cast<simgrid::kernel::activity::IoImpl>(process->waiting_synchro);
if (io != nullptr) {
simgrid::kernel::activity::IoImplPtr io =
boost::dynamic_pointer_cast<simgrid::kernel::activity::IoImpl>(process->waiting_synchro);
if (io != nullptr) {
-
SIMIX_io_destroy(process->waiting_synchro
);
+
delete io.get(
);
}
}
process->waiting_synchro = nullptr;
}
}
process->waiting_synchro = nullptr;
@@
-709,7
+709,7
@@
void SIMIX_process_yield(smx_actor_t self)
if (self->suspended_) {
XBT_DEBUG("Hey! I'm suspended.");
xbt_assert(self->exception != nullptr, "Gasp! This exception may be lost by subsequent calls.");
if (self->suspended_) {
XBT_DEBUG("Hey! I'm suspended.");
xbt_assert(self->exception != nullptr, "Gasp! This exception may be lost by subsequent calls.");
- self->suspended_ =
0
;
+ self->suspended_ =
false
;
self->suspend(self);
}
self->suspend(self);
}