SimGrid  3.13
Versatile Simulation of Distributed Systems
simgrid::simix Namespace Reference

Classes

class  args
 
class  AttachContext
 
class  BoostContext
 
class  BoostContextFactory
 
class  BoostSerialContext
 
class  Context
 
class  ContextFactory
 
class  ParallelUContext
 
class  RawContext
 
class  RawContextFactory
 
class  SerialUContext
 
class  ThreadContext
 
class  ThreadContextFactory
 
class  UContext
 
class  UContextFactory
 

Functions

template<class R , class F >
void fulfill_promise (std::promise< R > &promise, F &&code)
 Fulfill a promise by executing a given code. More...
 
template<class F >
void fulfill_promise (std::promise< void > &promise, F &&code)
 Fulfill a promise by executing a given code. More...
 
template<class F >
std::result_of< F()>::type kernel (F &&code)
 Execute some code in the kernel/maestro. More...
 
std::function< void()> wrap_main (xbt_main_func_t code, int argc, char **argv)
 
void set_maestro (std::function< void()> code)
 
void create_maestro (std::function< void()> code)
 
static void smx_ctx_boost_wrapper (std::intptr_t arg)
 
XBT_PRIVATE ContextFactoryboost_factory ()
 
ContextFactoryraw_factory ()
 
XBT_PRIVATE ContextFactorythread_factory ()
 
XBT_PRIVATE ContextFactorysysv_factory ()
 
template<class R , class... Args>
simcall (e_smx_simcall_t call, Args &&...args)
 

Variables

ContextFactoryInitializer factory_initializer = nullptr
 

Function Documentation

template<class R , class F >
void simgrid::simix::fulfill_promise ( std::promise< R > &  promise,
F &&  code 
)

Fulfill a promise by executing a given code.

template<class F >
void simgrid::simix::fulfill_promise ( std::promise< void > &  promise,
F &&  code 
)

Fulfill a promise by executing a given code.

This is a special version for std::promise<void> because the default version does not compile in this case.

template<class F >
std::result_of<F()>::type simgrid::simix::kernel ( F &&  code)

Execute some code in the kernel/maestro.

This can be used to enforce mutual exclusion with other simcall. More importantly, this enforces a deterministic/reproducible ordering of the operation with respect to other simcalls.

std::function<void()> simgrid::simix::wrap_main ( xbt_main_func_t  code,
int  argc,
char **  argv 
)
inline
void simgrid::simix::set_maestro ( std::function< void()>  code)
void simgrid::simix::create_maestro ( std::function< void()>  code)
static void simgrid::simix::smx_ctx_boost_wrapper ( std::intptr_t  arg)
static
XBT_PRIVATE ContextFactory * simgrid::simix::boost_factory ( )
XBT_PRIVATE ContextFactory * simgrid::simix::raw_factory ( )
XBT_PRIVATE ContextFactory * simgrid::simix::thread_factory ( )
XBT_PRIVATE ContextFactory * simgrid::simix::sysv_factory ( )
template<class R , class... Args>
R simgrid::simix::simcall ( e_smx_simcall_t  call,
Args &&...  args 
)
inline

Variable Documentation

ContextFactoryInitializer simgrid::simix::factory_initializer = nullptr