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
[xbt] Move throwpoint out of xbt_ex in WithContextException
[simgrid.git]
/
src
/
simix
/
smx_private.h
diff --git
a/src/simix/smx_private.h
b/src/simix/smx_private.h
index
6906a08
..
108b770
100644
(file)
--- a/
src/simix/smx_private.h
+++ b/
src/simix/smx_private.h
@@
-10,6
+10,7
@@
#include <functional>
#include <memory>
#include <unordered_map>
#include <functional>
#include <memory>
#include <unordered_map>
+#include <vector>
#include <xbt/functional.hpp>
#include <xbt/functional.hpp>
@@
-67,12
+68,6
@@
typedef struct s_smx_context_factory *smx_context_factory_t;
namespace simgrid {
namespace simix {
namespace simgrid {
namespace simix {
-// What's executed as SIMIX actor code:
-typedef std::function<void()> ActorCode;
-
-// Create ActorCode based on argv:
-typedef std::function<ActorCode(simgrid::xbt::args args)> ActorCodeFactory;
-
class Global {
public:
smx_context_factory_t context_factory = nullptr;
class Global {
public:
smx_context_factory_t context_factory = nullptr;
@@
-93,6
+88,9
@@
public:
/** Callback used when killing a SMX_process */
void_pfn_smxprocess_t cleanup_process_function = nullptr;
xbt_os_mutex_t mutex = nullptr;
/** Callback used when killing a SMX_process */
void_pfn_smxprocess_t cleanup_process_function = nullptr;
xbt_os_mutex_t mutex = nullptr;
+
+ std::vector<simgrid::xbt::Task<void()>> tasks;
+ std::vector<simgrid::xbt::Task<void()>> tasksTemp;
};
}
};
}
@@
-111,12
+109,9
@@
XBT_PUBLIC(void) SIMIX_clean(void);
#define SMX_EXCEPTION(issuer, cat, val, msg) \
if (1) { \
smx_process_t _smx_throw_issuer = (issuer); /* evaluate only once */ \
#define SMX_EXCEPTION(issuer, cat, val, msg) \
if (1) { \
smx_process_t _smx_throw_issuer = (issuer); /* evaluate only once */ \
- xbt_ex e(msg); \
+ xbt_ex e(
XBT_THROW_POINT,
msg); \
e.category = cat; \
e.value = val; \
e.category = cat; \
e.value = val; \
- e.file = __FILE__; \
- e.line = __LINE__; \
- e.func = __func__; \
_smx_throw_issuer->exception = std::make_exception_ptr(e); \
} else ((void)0)
_smx_throw_issuer->exception = std::make_exception_ptr(e); \
} else ((void)0)
@@
-177,8
+172,8
@@
XBT_PRIVATE void SIMIX_post_create_environment(void);
// FIXME, Dirty hack for SMPI+MSG
XBT_PRIVATE void SIMIX_process_set_cleanup_function(smx_process_t process, void_pfn_smxprocess_t cleanup);
// FIXME, Dirty hack for SMPI+MSG
XBT_PRIVATE void SIMIX_process_set_cleanup_function(smx_process_t process, void_pfn_smxprocess_t cleanup);
-XBT_PRIVATE simgrid::simix::ActorCodeFactory& SIMIX_get_actor_code_factory(const char *name);
-
SG_END_DECL()
SG_END_DECL()
+XBT_PRIVATE simgrid::simix::ActorCodeFactory& SIMIX_get_actor_code_factory(const char *name);
+
#endif
#endif