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
[doc] Add todo about user .then()
[simgrid.git]
/
src
/
mc
/
mc_base.cpp
diff --git
a/src/mc/mc_base.cpp
b/src/mc/mc_base.cpp
index
56d1ebd
..
7c350f7
100644
(file)
--- a/
src/mc/mc_base.cpp
+++ b/
src/mc/mc_base.cpp
@@
-21,7
+21,11
@@
#include "src/mc/mc_protocol.h"
#include "src/simix/Synchro.h"
#include "src/mc/mc_protocol.h"
#include "src/simix/Synchro.h"
+#include "src/simix/SynchroIo.hpp"
#include "src/simix/SynchroComm.hpp"
#include "src/simix/SynchroComm.hpp"
+#include "src/simix/SynchroRaw.hpp"
+#include "src/simix/SynchroSleep.hpp"
+#include "src/simix/SynchroExec.hpp"
#if HAVE_MC
#include "src/mc/mc_request.h"
#if HAVE_MC
#include "src/mc/mc_request.h"
@@
-73,9
+77,7
@@
void wait_for_requests(void)
bool request_is_enabled(smx_simcall_t req)
{
unsigned int index = 0;
bool request_is_enabled(smx_simcall_t req)
{
unsigned int index = 0;
-#if HAVE_MC
- simgrid::simix::Synchro temp_synchro;
-#endif
+ // TODO, add support for the subtypes?
switch (req->call) {
case SIMCALL_NONE:
switch (req->call) {
case SIMCALL_NONE:
@@
-88,9
+90,11
@@
bool request_is_enabled(smx_simcall_t req)
#if HAVE_MC
// Fetch from MCed memory:
#if HAVE_MC
// Fetch from MCed memory:
+ // HACK, type puning
+ simgrid::mc::Remote<simgrid::simix::Comm> temp_comm;
if (mc_model_checker != nullptr) {
if (mc_model_checker != nullptr) {
- mc_model_checker->process().read(
&temp_synchro
, remote(act));
- act =
&temp_synchro
;
+ mc_model_checker->process().read(
temp_comm
, remote(act));
+ act =
static_cast<simgrid::simix::Comm*>(temp_comm.getBuffer())
;
}
#endif
}
#endif
@@
-136,10
+140,12
@@
bool request_is_enabled(smx_simcall_t req)
for (index = 0; index < comms->used; ++index) {
#if HAVE_MC
// Fetch act from MCed memory:
for (index = 0; index < comms->used; ++index) {
#if HAVE_MC
// Fetch act from MCed memory:
+ // HACK, type puning
+ simgrid::mc::Remote<simgrid::simix::Comm> temp_comm;
if (mc_model_checker != nullptr) {
memcpy(&act, buffer + comms->elmsize * index, sizeof(act));
if (mc_model_checker != nullptr) {
memcpy(&act, buffer + comms->elmsize * index, sizeof(act));
- mc_model_checker->process().read(
&temp_synchro
, remote(act));
- act =
&temp_synchro
;
+ mc_model_checker->process().read(
temp_comm
, remote(act));
+ act =
static_cast<simgrid::simix::Comm*>(temp_comm.getBuffer())
;
}
else
#endif
}
else
#endif
@@
-156,10
+162,10
@@
bool request_is_enabled(smx_simcall_t req)
case SIMCALL_MUTEX_LOCK: {
smx_mutex_t mutex = simcall_mutex_lock__get__mutex(req);
#if HAVE_MC
case SIMCALL_MUTEX_LOCK: {
smx_mutex_t mutex = simcall_mutex_lock__get__mutex(req);
#if HAVE_MC
- s
_smx_mutex_t
temp_mutex;
+ s
imgrid::mc::Remote<simgrid::simix::Mutex>
temp_mutex;
if (mc_model_checker != nullptr) {
if (mc_model_checker != nullptr) {
- mc_model_checker->process().read(
&temp_mutex
, remote(mutex));
- mutex =
&temp_mutex
;
+ mc_model_checker->process().read(
temp_mutex.getBuffer()
, remote(mutex));
+ mutex =
temp_mutex.getBuffer()
;
}
#endif
}
#endif