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
[mc] Remove useless stuff in mc_private.h
[simgrid.git]
/
src
/
simix
/
BoostContext.hpp
diff --git
a/src/simix/BoostContext.hpp
b/src/simix/BoostContext.hpp
index
4f64f41
..
032e116
100644
(file)
--- a/
src/simix/BoostContext.hpp
+++ b/
src/simix/BoostContext.hpp
@@
-10,6
+10,7
@@
#ifndef SIMGRID_SIMIX_BOOST_CONTEXT_HPP
#define SIMGRID_SIMIX_BOOST_CONTEXT_HPP
#ifndef SIMGRID_SIMIX_BOOST_CONTEXT_HPP
#define SIMGRID_SIMIX_BOOST_CONTEXT_HPP
+#include <functional>
#include <vector>
#include <xbt/parmap.h>
#include <vector>
#include <xbt/parmap.h>
@@
-30,12
+31,12
@@
protected: // static
static bool parallel_;
static xbt_parmap_t parmap_;
static std::vector<BoostContext*> workers_context_;
static bool parallel_;
static xbt_parmap_t parmap_;
static std::vector<BoostContext*> workers_context_;
- static u
nsigned long
threads_working_;
+ static u
intptr_t
threads_working_;
static xbt_os_thread_key_t worker_id_key_;
static unsigned long process_index_;
static BoostContext* maestro_context_;
protected:
static xbt_os_thread_key_t worker_id_key_;
static unsigned long process_index_;
static BoostContext* maestro_context_;
protected:
-#if HAVE_BOOST_CONTEXT == 1
+#if HAVE_BOOST_CONTEXT
S
== 1
boost::context::fcontext_t* fc_ = nullptr;
#else
boost::context::fcontext_t fc_;
boost::context::fcontext_t* fc_ = nullptr;
#else
boost::context::fcontext_t fc_;
@@
-43,8
+44,7
@@
protected:
void* stack_ = nullptr;
public:
friend BoostContextFactory;
void* stack_ = nullptr;
public:
friend BoostContextFactory;
- BoostContext(xbt_main_func_t code,
- int argc, char **argv,
+ BoostContext(std::function<void()> code,
void_pfn_smxprocess_t cleanup_func,
smx_process_t process);
~BoostContext();
void_pfn_smxprocess_t cleanup_func,
smx_process_t process);
~BoostContext();
@@
-61,10
+61,8
@@
public:
BoostContextFactory();
virtual ~BoostContextFactory();
BoostContextFactory();
virtual ~BoostContextFactory();
- virtual Context* create_context(
- xbt_main_func_t, int, char **, void_pfn_smxprocess_t,
- smx_process_t process
- ) override;
+ virtual Context* create_context(std::function<void()> code,
+ void_pfn_smxprocess_t, smx_process_t process) override;
void run_all() override;
};
void run_all() override;
};