/* 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
{
unsigned work = parmap->work;
/* wait for more work */
- if (work != round)
+ while (work != round) {
futex_wait(&parmap->work, work);
+ work = parmap->work;
+ }
}
#endif
#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);