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
File is unused since commit 678328fb7b84cbcebfff2e5df242b59fb0a0b9ff.
[simgrid.git]
/
src
/
xbt
/
parmap.c
diff --git
a/src/xbt/parmap.c
b/src/xbt/parmap.c
index
8219493
..
6e0a728
100644
(file)
--- a/
src/xbt/parmap.c
+++ b/
src/xbt/parmap.c
@@
-3,7
+3,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 "
gras
_config.h"
+#include "
internal
_config.h"
#include <unistd.h>
#ifndef _XBT_WIN32
#include <unistd.h>
#ifndef _XBT_WIN32
@@
-416,8
+416,10
@@
static void xbt_parmap_futex_worker_wait(xbt_parmap_t parmap, unsigned round)
{
unsigned work = parmap->work;
/* wait for more work */
{
unsigned work = parmap->work;
/* wait for more work */
- if (work != round)
+ while (work != round) {
futex_wait(&parmap->work, work);
futex_wait(&parmap->work, work);
+ work = parmap->work;
+ }
}
#endif
}
#endif
@@
-482,7
+484,7
@@
static void xbt_parmap_busy_worker_wait(xbt_parmap_t parmap, unsigned round)
#include "xbt/ex.h"
#include "xbt/xbt_os_thread.h"
#include "xbt/xbt_os_time.h"
#include "xbt/ex.h"
#include "xbt/xbt_os_thread.h"
#include "xbt/xbt_os_time.h"
-#include "
gras
_config.h" /* HAVE_FUTEX_H */
+#include "
internal
_config.h" /* HAVE_FUTEX_H */
XBT_TEST_SUITE("parmap", "Parallel Map");
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(xbt_parmap_unit);
XBT_TEST_SUITE("parmap", "Parallel Map");
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(xbt_parmap_unit);