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
[NS3, trace] instrumentation point to be implemented
[simgrid.git]
/
src
/
xbt
/
log.c
diff --git
a/src/xbt/log.c
b/src/xbt/log.c
index
7ec8465
..
6915419
100644
(file)
--- a/
src/xbt/log.c
+++ b/
src/xbt/log.c
@@
-626,10
+626,6
@@
void _xbt_log_event_log(xbt_log_event_t ev, const char *fmt, ...)
}
va_end(ev->ap);
va_end(ev->ap_copy);
}
va_end(ev->ap);
va_end(ev->ap_copy);
-
-#ifdef _XBT_WIN32
- free(ev->buffer);
-#endif
}
/* NOTE:
}
/* NOTE:
@@
-691,9
+687,14
@@
int _xbt_log_cat_init(xbt_log_category_t category,
{
#define _xbt_log_cat_init(a, b) (0)
{
#define _xbt_log_cat_init(a, b) (0)
- xbt_os_rmutex_acquire(log_cat_init_mutex);
+ if (log_cat_init_mutex != NULL) {
+ xbt_os_rmutex_acquire(log_cat_init_mutex);
+ }
+
if (category->threshold != xbt_log_priority_uninitialized) {
if (category->threshold != xbt_log_priority_uninitialized) {
- xbt_os_rmutex_release(log_cat_init_mutex);
+ if (log_cat_init_mutex != NULL) {
+ xbt_os_rmutex_release(log_cat_init_mutex);
+ }
return priority >= category->threshold;
}
return priority >= category->threshold;
}
@@
-750,7
+751,9
@@
int _xbt_log_cat_init(xbt_log_category_t category,
/* Apply the control */
if (!xbt_log_settings) {
/* Apply the control */
if (!xbt_log_settings) {
- xbt_os_rmutex_release(log_cat_init_mutex);
+ if (log_cat_init_mutex != NULL) {
+ xbt_os_rmutex_release(log_cat_init_mutex);
+ }
return priority >= category->threshold;
}
return priority >= category->threshold;
}
@@
-777,7
+780,9
@@
int _xbt_log_cat_init(xbt_log_category_t category,
category->name, xbt_log_priority_names[category->threshold],
category->threshold);
category->name, xbt_log_priority_names[category->threshold],
category->threshold);
- xbt_os_rmutex_release(log_cat_init_mutex);
+ if (log_cat_init_mutex != NULL) {
+ xbt_os_rmutex_release(log_cat_init_mutex);
+ }
return priority >= category->threshold;
#undef _xbt_log_cat_init
return priority >= category->threshold;
#undef _xbt_log_cat_init