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
simplify and fix cycle detection
[simgrid.git]
/
src
/
xbt
/
xbt_replay.cpp
diff --git
a/src/xbt/xbt_replay.cpp
b/src/xbt/xbt_replay.cpp
index
06f9221
..
50f208a
100644
(file)
--- a/
src/xbt/xbt_replay.cpp
+++ b/
src/xbt/xbt_replay.cpp
@@
-48,7
+48,7
@@
static char *str_tolower (const char *str)
return ret;
}
return ret;
}
-int _xbt_replay_is_active(
void
){
+int _xbt_replay_is_active(){
return is_replay_active;
}
return is_replay_active;
}
@@
-118,7
+118,7
@@
void xbt_replay_action_register(const char *action_name, action_fun function)
*
* It returns false if it was already done by another process.
*/
*
* It returns false if it was already done by another process.
*/
-int _xbt_replay_action_init(
void
)
+int _xbt_replay_action_init()
{
if (xbt_action_funs)
return 0;
{
if (xbt_action_funs)
return 0;
@@
-128,7
+128,7
@@
int _xbt_replay_action_init(void)
return 1;
}
return 1;
}
-void _xbt_replay_action_exit(
void
)
+void _xbt_replay_action_exit()
{
xbt_dict_free(&xbt_action_queues);
xbt_dict_free(&xbt_action_funs);
{
xbt_dict_free(&xbt_action_queues);
xbt_dict_free(&xbt_action_funs);
@@
-147,12
+147,11
@@
void _xbt_replay_action_exit(void)
*/
int xbt_replay_action_runner(int argc, char *argv[])
{
*/
int xbt_replay_action_runner(int argc, char *argv[])
{
- int i;
if (xbt_action_fp) { // A unique trace file
while (true) {
char **evt = action_get_action(argv[0]);
if (evt == nullptr)
if (xbt_action_fp) { // A unique trace file
while (true) {
char **evt = action_get_action(argv[0]);
if (evt == nullptr)
- break;
+ break;
char* lowername = str_tolower (evt[1]);
action_fun function = (action_fun)xbt_dict_get(xbt_action_funs, lowername);
char* lowername = str_tolower (evt[1]);
action_fun function = (action_fun)xbt_dict_get(xbt_action_funs, lowername);
@@
-163,7
+162,7
@@
int xbt_replay_action_runner(int argc, char *argv[])
catch(xbt_ex& e) {
xbt_die("Replay error :\n %s", e.what());
}
catch(xbt_ex& e) {
xbt_die("Replay error :\n %s", e.what());
}
- for (i=0;evt[i]!= nullptr;i++)
+ for (i
nt i
=0;evt[i]!= nullptr;i++)
free(evt[i]);
free(evt);
}
free(evt[i]);
free(evt);
}