+ simcall_execution_test__set__result(simcall, (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING));
+ if (simcall_execution_test__get__result(simcall)) {
+ synchro->simcalls.push_back(simcall);
+ SIMIX_execution_finish(synchro);
+ } else {
+ SIMIX_simcall_answer(simcall);
+ }
+ /* If the synchro is already finished then perform the error handling */
+ if (synchro->state != SIMIX_RUNNING)
+ SIMIX_execution_finish(synchro);
+}
+
+void SIMIX_execution_finish(smx_activity_t synchro)
+{
+ simgrid::kernel::activity::ExecImplPtr exec =
+ boost::static_pointer_cast<simgrid::kernel::activity::ExecImpl>(synchro);
+
+ while (not synchro->simcalls.empty()) {
+ smx_simcall_t simcall = synchro->simcalls.front();
+ synchro->simcalls.pop_front();