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
[simix] Use C++ templates for generating the marshaling/unmashaling code
[simgrid.git]
/
src
/
xbt
/
parmap.cpp
diff --git
a/src/xbt/parmap.cpp
b/src/xbt/parmap.cpp
index
028ece1
..
2445b0b
100644
(file)
--- a/
src/xbt/parmap.cpp
+++ b/
src/xbt/parmap.cpp
@@
-27,7
+27,6
@@
#include "xbt/xbt_os_thread.h"
#include "xbt/sysdep.h"
#include "src/simix/smx_private.h"
#include "xbt/xbt_os_thread.h"
#include "xbt/sysdep.h"
#include "src/simix/smx_private.h"
-#include "src/simix/smx_private.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_parmap, xbt, "parmap: parallel map");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_parmap, xbt, "parmap: parallel map");
@@
-273,7
+272,7
@@
static void *xbt_parmap_worker_main(void *arg)
xbt_parmap_thread_data_t data = (xbt_parmap_thread_data_t) arg;
xbt_parmap_t parmap = data->parmap;
unsigned round = 0;
xbt_parmap_thread_data_t data = (xbt_parmap_thread_data_t) arg;
xbt_parmap_t parmap = data->parmap;
unsigned round = 0;
- smx_context_t context = SIMIX_context_new(
NULL, 0, NULL
, NULL, NULL);
+ smx_context_t context = SIMIX_context_new(
std::function<void()>()
, NULL, NULL);
SIMIX_context_set_current(context);
XBT_DEBUG("New worker thread created");
SIMIX_context_set_current(context);
XBT_DEBUG("New worker thread created");
@@
-290,7
+289,7
@@
static void *xbt_parmap_worker_main(void *arg)
XBT_DEBUG("Worker %d has finished", data->worker_id);
/* We are destroying the parmap */
} else {
XBT_DEBUG("Worker %d has finished", data->worker_id);
/* We are destroying the parmap */
} else {
-
SIMIX_context_free(context)
;
+
delete context
;
xbt_free(data);
return NULL;
}
xbt_free(data);
return NULL;
}