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
[mc] Remove useless extern "C" around logging categories
[simgrid.git]
/
src
/
mc
/
mc_client.cpp
diff --git
a/src/mc/mc_client.cpp
b/src/mc/mc_client.cpp
index
12edc6b
..
a173b8f
100644
(file)
--- a/
src/mc/mc_client.cpp
+++ b/
src/mc/mc_client.cpp
@@
-15,19
+15,18
@@
#include <xbt/sysdep.h>
#include <xbt/mmalloc.h>
#include <xbt/sysdep.h>
#include <xbt/mmalloc.h>
-#include "mc_protocol.h"
-#include "mc_client.h"
+#include "
src/mc/
mc_protocol.h"
+#include "
src/mc/
mc_client.h"
// We won't need those once the separation MCer/MCed is complete:
// We won't need those once the separation MCer/MCed is complete:
-#include "mc_mmalloc.h"
-#include "mc_ignore.h"
-#include "mc_private.h" // MC_deadlock_check()
-#include "mc_smx.h"
-
-extern "C" {
+#include "src/mc/mc_ignore.h"
+#include "src/mc/mc_private.h" // MC_deadlock_check()
+#include "src/mc/mc_smx.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_client, mc, "MC client logic");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_client, mc, "MC client logic");
+extern "C" {
+
mc_client_t mc_client;
void MC_client_init(void)
mc_client_t mc_client;
void MC_client_init(void)
@@
-47,7
+46,7
@@
void MC_client_init(void)
if (!fd_env)
xbt_die("MC socket not found");
if (!fd_env)
xbt_die("MC socket not found");
- int fd =
atoi(fd_env
);
+ int fd =
xbt_str_parse_int(fd_env,bprintf("Variable %s should contain a number but contains '%%s'", MC_ENV_SOCKET_FD)
);
XBT_DEBUG("Model-checked application found socket FD %i", fd);
int type;
XBT_DEBUG("Model-checked application found socket FD %i", fd);
int type;
@@
-63,7
+62,7
@@
void MC_client_init(void)
mc_client->active = 1;
// Waiting for the model-checker:
mc_client->active = 1;
// Waiting for the model-checker:
- if (ptrace(PTRACE_TRACEME, 0,
NULL
, NULL) == -1 || raise(SIGSTOP) != 0)
+ if (ptrace(PTRACE_TRACEME, 0,
nullptr
, NULL) == -1 || raise(SIGSTOP) != 0)
xbt_die("Could not wait for the model-checker");
MC_client_handle_messages();
}
xbt_die("Could not wait for the model-checker");
MC_client_handle_messages();
}
@@
-149,7
+148,7
@@
void MC_client_main_loop(void)
while (1) {
MC_protocol_send_simple_message(mc_client->fd, MC_MESSAGE_WAITING);
MC_client_handle_messages();
while (1) {
MC_protocol_send_simple_message(mc_client->fd, MC_MESSAGE_WAITING);
MC_client_handle_messages();
-
MC_
wait_for_requests();
+
simgrid::mc::
wait_for_requests();
}
}
}
}