SimGrid  3.14.159
Versatile Simulation of Distributed Systems
simgrid::kernel::context::BoostContext Class Reference

Detailed Description

Userspace context switching implementation based on Boost.Context.

#include <ContextBoost.hpp>

Inheritance diagram for simgrid::kernel::context::BoostContext:
simgrid::kernel::context::Context simgrid::kernel::context::BoostSerialContext

Public Member Functions

 BoostContext (std::function< void()> code, void_pfn_smxprocess_t cleanup_func, smx_actor_t process)
 
 ~BoostContext () override
 
virtual void resume ()
 
- Public Member Functions inherited from simgrid::kernel::context::Context
 Context (std::function< void()> code, void_pfn_smxprocess_t cleanup_func, smx_actor_t process)
 
void operator() ()
 
bool has_code () const
 
smx_actor_t process ()
 
void set_cleanup (void_pfn_smxprocess_t cleanup)
 
virtual ~Context ()
 
virtual void stop ()
 
virtual void suspend ()=0
 

Public Attributes

friend BoostContextFactory
 
- Public Attributes inherited from simgrid::kernel::context::Context
bool iwannadie
 

Protected Attributes

boost::context::fcontext_t fc_
 
voidstack_ = nullptr
 

Static Protected Attributes

static bool parallel_ = false
 
static xbt_parmap_t parmap_ = nullptr
 
static std::vector< BoostContext * > workers_context_
 
static uintptr_t threads_working_ = 0
 
static xbt_os_thread_key_t worker_id_key_
 
static unsigned long process_index_ = 0
 
static BoostContextmaestro_context_ = nullptr
 

Constructor & Destructor Documentation

◆ BoostContext()

simgrid::kernel::context::BoostContext::BoostContext ( std::function< void()>  code,
void_pfn_smxprocess_t  cleanup_func,
smx_actor_t  process 
)

◆ ~BoostContext()

simgrid::kernel::context::BoostContext::~BoostContext ( )
override

Member Function Documentation

◆ resume()

void simgrid::kernel::context::BoostContext::resume ( )
virtual

Member Data Documentation

◆ parallel_

bool simgrid::kernel::context::BoostContext::parallel_ = false
staticprotected

◆ parmap_

xbt_parmap_t simgrid::kernel::context::BoostContext::parmap_ = nullptr
staticprotected

◆ workers_context_

std::vector< BoostContext * > simgrid::kernel::context::BoostContext::workers_context_
staticprotected

◆ threads_working_

uintptr_t simgrid::kernel::context::BoostContext::threads_working_ = 0
staticprotected

◆ worker_id_key_

xbt_os_thread_key_t simgrid::kernel::context::BoostContext::worker_id_key_
staticprotected

◆ process_index_

unsigned long simgrid::kernel::context::BoostContext::process_index_ = 0
staticprotected

◆ maestro_context_

BoostContext * simgrid::kernel::context::BoostContext::maestro_context_ = nullptr
staticprotected

◆ fc_

boost::context::fcontext_t simgrid::kernel::context::BoostContext::fc_
protected

◆ stack_

void* simgrid::kernel::context::BoostContext::stack_ = nullptr
protected

◆ BoostContextFactory

friend simgrid::kernel::context::BoostContext::BoostContextFactory

The documentation for this class was generated from the following files: