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
Rename some activity/SynchroBlah into activity/BlahImpl (+clang-format)
[simgrid.git]
/
src
/
mc
/
ModelChecker.cpp
diff --git
a/src/mc/ModelChecker.cpp
b/src/mc/ModelChecker.cpp
index
af0c666
..
2f44304
100644
(file)
--- a/
src/mc/ModelChecker.cpp
+++ b/
src/mc/ModelChecker.cpp
@@
-14,23
+14,22
@@
#include <memory>
#include <system_error>
#include <memory>
#include <system_error>
-#include
<xbt/log.h>
-#include
<xbt/automaton.h>
-#include
<xbt/automaton.hpp>
-#include
<xbt/system_error.hpp>
+#include
"xbt/automaton.h"
+#include
"xbt/automaton.hpp"
+#include
"xbt/log.h"
+#include
"xbt/system_error.hpp"
#include "simgrid/sg_config.h"
#include "src/mc/ModelChecker.hpp"
#include "simgrid/sg_config.h"
#include "src/mc/ModelChecker.hpp"
-#include "src/mc/PageStore.hpp"
#include "src/mc/ModelChecker.hpp"
#include "src/mc/ModelChecker.hpp"
-#include "src/mc/
mc_protocol.h
"
-#include "src/mc/
mc_private.h
"
-#include "src/mc/
mc_ignore.h
"
+#include "src/mc/
PageStore.hpp
"
+#include "src/mc/
Transition.hpp
"
+#include "src/mc/
checker/Checker.hpp
"
#include "src/mc/mc_exit.h"
#include "src/mc/mc_exit.h"
+#include "src/mc/mc_private.h"
#include "src/mc/mc_record.h"
#include "src/mc/mc_record.h"
-#include "src/mc/Transition.hpp"
-#include "src/mc/Checker.hpp"
+#include "src/mc/remote/mc_protocol.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_ModelChecker, mc, "ModelChecker");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_ModelChecker, mc, "ModelChecker");
@@
-92,7
+91,7
@@
void ModelChecker::start()
// The model-checked process SIGSTOP itself to signal it's ready:
pid_t res = waitpid(pid, &status, WAITPID_CHECKED_FLAGS);
// The model-checked process SIGSTOP itself to signal it's ready:
pid_t res = waitpid(pid, &status, WAITPID_CHECKED_FLAGS);
- if (res < 0 ||
!
WIFSTOPPED(status) || WSTOPSIG(status) != SIGSTOP)
+ if (res < 0 ||
not
WIFSTOPPED(status) || WSTOPSIG(status) != SIGSTOP)
xbt_die("Could not wait model-checked process");
process_->init();
xbt_die("Could not wait model-checked process");
process_->init();
@@
-161,16
+160,6
@@
void ModelChecker::resume(simgrid::mc::Process& process)
process.clear_cache();
}
process.clear_cache();
}
-static
-void throw_socket_error(int fd)
-{
- int error = 0;
- socklen_t errlen = sizeof(error);
- if (getsockopt(fd, SOL_SOCKET, SO_ERROR, (void *)&error, &errlen) == -1)
- error = errno;
- throw simgrid::xbt::errno_error();
-}
-
static void MC_report_crash(int status)
{
XBT_INFO("**************************");
static void MC_report_crash(int status)
{
XBT_INFO("**************************");
@@
-193,7
+182,7
@@
static void MC_report_crash(int status)
mc_model_checker->process().dumpStack();
}
mc_model_checker->process().dumpStack();
}
-static void MC_report_assertion_error(
void
)
+static void MC_report_assertion_error()
{
XBT_INFO("**************************");
XBT_INFO("*** PROPERTY NOT VALID ***");
{
XBT_INFO("**************************");
XBT_INFO("*** PROPERTY NOT VALID ***");
@@
-316,7
+305,7
@@
void ModelChecker::handle_events(int fd, short events)
ssize_t size = process_->getChannel().receive(buffer, sizeof(buffer), false);
if (size == -1 && errno != EAGAIN)
throw simgrid::xbt::errno_error();
ssize_t size = process_->getChannel().receive(buffer, sizeof(buffer), false);
if (size == -1 && errno != EAGAIN)
throw simgrid::xbt::errno_error();
- if (
!
handle_message(buffer, size)) {
+ if (
not
handle_message(buffer, size)) {
event_base_loopbreak(base_);
}
}
event_base_loopbreak(base_);
}
}