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
Ongoing attempt for sthread, an automatic intercepter of pthread operations
[simgrid.git]
/
src
/
xbt
/
log.cpp
diff --git
a/src/xbt/log.cpp
b/src/xbt/log.cpp
index
916c77b
..
bdb7d6f
100644
(file)
--- a/
src/xbt/log.cpp
+++ b/
src/xbt/log.cpp
@@
-5,6
+5,7
@@
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include "src/sthread/sthread.h" // sthread_inside_simgrid
#include "src/xbt/log_private.hpp"
#include "xbt/string.hpp"
#include "xbt/sysdep.h"
#include "src/xbt/log_private.hpp"
#include "xbt/string.hpp"
#include "xbt/sysdep.h"
@@
-246,6
+247,8
@@
int _xbt_log_cat_init(xbt_log_category_t category, e_xbt_log_priority_t priority
if (category->initialized)
return priority >= category->threshold;
if (category->initialized)
return priority >= category->threshold;
+ int old_inside_simgrid = sthread_inside_simgrid;
+ sthread_inside_simgrid = 1;
if (log_cat_init_mutex != nullptr)
log_cat_init_mutex->lock();
if (log_cat_init_mutex != nullptr)
log_cat_init_mutex->lock();
@@
-293,6
+296,7
@@
int _xbt_log_cat_init(xbt_log_category_t category, e_xbt_log_priority_t priority
category->initialized = 1;
if (log_cat_init_mutex != nullptr)
log_cat_init_mutex->unlock();
category->initialized = 1;
if (log_cat_init_mutex != nullptr)
log_cat_init_mutex->unlock();
+ sthread_inside_simgrid = old_inside_simgrid;
return priority >= category->threshold;
}
return priority >= category->threshold;
}