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
MSG_process_ref/unref: allow to fiddle with the process refcounting
[simgrid.git]
/
src
/
msg
/
msg_synchro.cpp
diff --git
a/src/msg/msg_synchro.cpp
b/src/msg/msg_synchro.cpp
index
eb1b250
..
a480186
100644
(file)
--- a/
src/msg/msg_synchro.cpp
+++ b/
src/msg/msg_synchro.cpp
@@
-4,12
+4,10
@@
/* 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
<xbt/ex.hpp>
+#include
"xbt/ex.hpp"
#include "msg_private.h"
#include "msg_private.h"
-#include "xbt/log.h"
#include "xbt/synchro.h"
#include "xbt/synchro.h"
-#include "xbt/sysdep.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_synchro, msg, "Logging specific to MSG (synchro)");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_synchro, msg, "Logging specific to MSG (synchro)");
@@
-91,7
+89,8
@@
void MSG_barrier_destroy(msg_bar_t bar) {
/** @brief Performs a barrier already initialized */
int MSG_barrier_wait(msg_bar_t bar) {
xbt_mutex_acquire(bar->mutex);
/** @brief Performs a barrier already initialized */
int MSG_barrier_wait(msg_bar_t bar) {
xbt_mutex_acquire(bar->mutex);
- if (++bar->arrived_processes == bar->expected_processes) {
+ bar->arrived_processes++;
+ if (bar->arrived_processes == bar->expected_processes) {
xbt_cond_broadcast(bar->cond);
xbt_mutex_release(bar->mutex);
bar->arrived_processes = 0;
xbt_cond_broadcast(bar->cond);
xbt_mutex_release(bar->mutex);
bar->arrived_processes = 0;